Tagged: x
-
AuthorPosts
-
December 20, 2016 at 7:42 pm #1300019
spiParticipantHi,
I’m using Integrity stack. I’m trying to make the main nav (just on the home page which id number is 11) to appear transparent so that the revolution slider video would appear behind the menu nicely. The 1 video slider is below the masthead. When the visitor scrolls down, the nav menu must become non-transparent again so that the visitor could see the items on it clearly.
Here is an example: http://www.waituk.net/themes/html/entrada/index.html
I want the nav bar to function just like on this website.I’ve tried many solutions on your forum and non worked exactly what I wanted.
Thanks!
December 20, 2016 at 7:42 pm #1300020
spiParticipantThis reply has been marked as private.December 21, 2016 at 2:07 am #1300224
Paul RModeratorHi,
To achieve that, you can add this under Cornerstone > Settings > Custom CSS
.x-navbar .desktop .x-nav > li > a { color:#fff; padding-top: 25px; } .x-navbar { background-color: rgba(0,0,0,0.5); } .x-navbar.x-navbar-fixed-top { background-color:#fff; } .x-navbar.x-navbar-fixed-top .desktop .x-nav > li > a { color:#000; }Then add this in Cornerstone > Settings > Custom JS
jQuery(document).ready(function($){ $(window).scroll(function(){ if ( $(this).scrollTop() == 0 ) { $('.x-navbar').removeClass('x-navbar-fixed-top'); } }); });Hope that helps
December 22, 2016 at 3:30 pm #1302054
spiParticipantThanks Paul.
The nav bar appears when I scroll which is good, but it’s not transparent and I can’t see the video behind it. The video must appear behind the nav bar. Give me another code please. I feel like the JS code is correct but the CSS isn’t?
Best,
December 22, 2016 at 9:01 pm #1302396
RadModeratorHi there,
The code is correct, please implement it. It just need a few modification.
Change this CSS block
.x-navbar { background-color: rgba(0,0,0,0.5); } .x-navbar.x-navbar-fixed-top { background-color:#fff; }to this simplified one
.x-navbar:not(.x-navbar-fixed-top) { background: transparent !important; }And add this CSS,
.home .masthead{ height: 0px; }Don’t forget to implement the javascript, it’s the main code that switches navbar class for transparency.
Thanks!
December 26, 2016 at 11:28 pm #1305251
spiParticipantThanks Rad, it works now. My initial nav bar items colour is white, hence I had to add some more CSS code for the menu to appear clearly when the user scrolls down.
Thanks again team X!
December 26, 2016 at 11:42 pm #1305302
Paul RModeratorYou’re welcome! 🙂
December 30, 2016 at 8:10 pm #1310584
spiParticipantHey
Just one more thing please. If you check my website which is mentioned above, you’ll see that there is still a think line underneath the navbar. How to remove that line?
Thanks again
December 30, 2016 at 10:31 pm #1310674
FriechModeratorHi There,
Add this on your custom CSS.
#header, .logo, .navbar-default .navbar-nav .v-divider { border-width: 0; }Hope it helps, Cheers!
December 31, 2016 at 7:40 pm #1311275
spiParticipantHi,
I’ve tried the mentioned code but nothing changed. I still see the thin line under the header navbar.
🙂
January 1, 2017 at 2:54 am #1311458
ChristopherModeratorHi there,
Please add this as well :
.x-navbar { box-shadow: none; border: none; }Hope it helps.
January 1, 2017 at 11:03 pm #1312143
spiParticipantworked perfectly!
thanks!
January 2, 2017 at 12:55 am #1312221
Paul RModeratorYou’re welcome! 😉
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1300019 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
