Tagged: x
-
AuthorPosts
-
August 10, 2016 at 3:52 pm #1126159
Hi,
I’ve done some reading and tweaking, but I can’t for the life of me find out where I’m setting the background color.
My navbar is transparent and its still showing white until I scroll down through the header.
So I think I’m setting the body background to white somewhere?
Help!
August 10, 2016 at 11:05 pm #1126687Hello There,
Thanks for writing in! To assist you better with this issue, would you mind providing us the url of your site with login credentials, if necessary, so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password (only if necessary)Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thank you.
August 11, 2016 at 12:30 am #1126757This reply has been marked as private.August 11, 2016 at 3:55 am #1126932Hello There,
Thank you for providing the information. To resolve this issue, please edit your page in Cornerstone and insert the following custom css in the settings tab, Settings > Custom CSS
@media(min-width: 980px){ body.x-navbar-fixed-top-active .x-navbar-wrap { height: 0px; } }
Hope this helps. Please let us know how it goes.
August 11, 2016 at 4:23 am #1126946Thanks.
It’s now working for desktop view but mobile view still shows it as white?
August 11, 2016 at 6:56 am #1127068Hi There,
Please update above CSS to this:
body.x-navbar-fixed-top-active .x-navbar-wrap { height: 0px; }
Hope this helps.
August 11, 2016 at 7:43 am #1127110That’s it thanks…but now when I scroll the navbar background is not appearing.
Can it be transparent until I scroll and then say 30% transparent like before?
August 11, 2016 at 8:47 am #1127191Also, the Navbar is no longer fixed in mobile view….so it just stays at the top when I scroll?
August 11, 2016 at 8:59 am #1127214Hi There,
To have your navbar changing color when scrolling please add the following code to Appereance Customizer Custom Javascript:
jQuery(document).ready(function($){ $('.x-navbar').addClass("x-nav-trans"); $(window).scroll(function(){ if( $(this).scrollTop() > 100 ) { $('.x-navbar-fixed-top').addClass("x-nav-trans"); }else{ $('.x-navbar-fixed-top').removeClass("x-nav-trans"); } }); });
And the following code to Appereance Customizer Custom CSS
.x-navbar.x-nav-trans { background-color: rgba(255,255,255,0.4) !important; }
To make the navbar on mobile fixed please add the following code to Appearance Customizer Custom CSS
@media (max-width: 979px) { .x-navbar-fixed-top, .x-navbar-fixed-left, .x-navbar-fixed-right { position: fixed; } }
Hope it helps
Joao
August 11, 2016 at 10:23 am #1127318Thanks Joao!
I hate to come back with something, but now on first load the 40% navbar shows.
It’s fine once I scroll down and scroll back up, it disappears and the bar is 100% transparent….it’s just the initial page load.
Any ideas why it would do this?
(the code for fixing the mobile navbar worked perfectly thanks!)
August 11, 2016 at 11:12 am #1127380Hi There,
Please use the following code instead on your Custom > Javascript:
jQuery(document).ready(function($){ $(window).scroll(function(){ if( $(this).scrollTop() > 100 ) { $('.x-navbar-fixed-top').addClass("x-nav-trans"); }else{ $('.x-navbar-fixed-top').removeClass("x-nav-trans"); } }); });
August 11, 2016 at 11:56 am #1127438That worked! Thank you guys so much for your help!
August 11, 2016 at 12:44 pm #1127509You are very welcome 🙂
-
AuthorPosts