Currently, I am in the process of constructing a website on rails and have successfully integrated a site-wide navigation bar to display on all pages. However, an issue has arisen where the navbar is visible on both pages, yet the links and hover effects are only clickable on one page. Despite rendering the same _navigation.html.erb and nav.scss files, I cannot pinpoint what has caused this discrepancy.
_navigation.html.erb
<nav>
<div class="container nav-container">
<div class="row">
<div class="nav-wrapper">
<a href="#" id="brand-logo" class="col l2"><img src="<%= asset_path('social-playground-logo.png')%>"></a>
<ul id="nav-mobile" class=" col l10 right hide-on-med-and-down nav-desktop">
<li><a id="link-home" href="">Home</a></li>
<li><a id="link-toys" href="">Toys</a></li>
<li><a id="link-pastevents" href="">Past Events</a></li>
<li><a id="link-contacts" href="">Contacts</a></li>
<li><a id="link-partners" href="">Partners</a></li>
</ul>
</div>
</div>
</div>
The navbar and hero image extract for gifpage.html.erb (functioning correctly)
<div class="hero-image-container group">
<%= render 'layouts/navigation' %>
<img id="gif-foreground-hero" src="<%= asset_path( 'GIF Foreground FInal.png') %>" class="responsive-img">
The navbar and hero image extract for selfies.html.erb (not functioning correctly)
<div class="selfies-hero-image-container group">
<%= render 'layouts/navigation' %>
<img id="selfie-foreground-hero" src="<%= asset_path( 'Selfie-hero-foreground.png') %>" class="responsive-img">
_nav.scss file affecting both pages
nav {
height: 112px;
line-height: 23px;
background: rgba(10, 10, 10, 0.5);
.nav-container {
width: 100%;
#brand-logo {
transform: scale(0.8);
margin-top: 7px;
margin-left: 4%;
}
#nav-mobile {
margin-right: 0%;
margin-left: 0%;
width: 79.33333%;
}
ul li {
margin-top: 27px;
margin-left: 29px;
a {
text-transform: uppercase;
border: 4px solid rgba(255, 255, 255, 0);
margin: 0px;
padding: 14px 25px;
display: inline-block;
&:hover {
border: 4px solid rgba(255, 255, 255, 1);
}
}
}
}
}
The hover effect appears on the gif page but not on the selfies page.
Thank you!https://i.sstatic.net/QfGwK.jpg
https://i.sstatic.net/JMiIk.jpg
Both hero images display through the navbar which has 0.5 opacity.
Thanks
EDIT
Output from the terminal
Started GET "/gifpage" for 59.167.19.225 at 2015-10-21 05:30:23 +0000
Cannot render console from 59.167.19.225! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by PagesController#gifpage as HTML
Rendered layouts/_navigation.html.erb (0.5ms)
Rendered pages/gifpage.html.erb within layouts/application (62.3ms)
Rendered layouts/_footer.html.erb (0.0ms)
Completed 200 OK in 445ms (Views: 444.1ms | ActiveRecord: 0.0ms)
with,
Started GET "/assets/_nav-87ab5873b40bcbbebe26b4faa985fc95.css?body=1"
referencing the _nav.scss file being used for the functional page, and,
Started GET "/" for 59.167.19.225 at 2015-10-21 05:34:25 +0000
Cannot render console from 59.167.19.225! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by PagesController#selfies as HTML
Rendered layouts/_navigation.html.erb (0.9ms)
Rendered pages/selfies.html.erb within layouts/application (8.0ms)
Rendered layouts/_footer.html.erb (0.0ms)
Completed 200 OK in 410ms (Views: 408.8ms | ActiveRecord: 0.0ms)
with,
Started GET "/assets/_nav-87ab5873b40bcbbebe26b4faa985fc95.css?body=1"
related to the _nav.scss file being utilized for the malfunctioning page.
I diligently compared both CSS files and structures side-by-side using Chrome's inspect element tool, and discovered no discernible differences. The mystery remains unsolved!