Search code examples
cssruby-on-railshtmlhyperlinkunicorn

Rails - Links don't work on certain pages?


I have my website uploaded, you can check it out at: http://origin-of-foods.com

The problem is that my navbar links don't work when I am on a food page! On any other page, the 7 random food links will work.

Actually, I noticed that the first 1/7 food links work, but not the whole word either. I tried moving my z-index up but that wasn't it. The navbar code is stored in /app/views/layout/application.html.erb

Does anyone have any idea what is happening?

I am using Rails v4.2, Ruby v2.1.3, unicorn v4.8.3, nginx v1.6.2


Solution

  • The reason it does not work is because your css is all over the place and you are position everything relative and absolute and then using margins there are multiple elements laying over top of you navigation bar and that is why you are not able to click on them. The picture below shows one instance but I viewed a few more elements and they were also overlapping your nav bar. Also you should really try to comprehend how postion relative and absolute positioning works I hope I can point you in the right direction.

    http://www.w3schools.com/css/css_positioning.asp

    OverLapping Elements