Tagged: x
-
AuthorPosts
-
September 25, 2016 at 9:51 am #1189783
maheu88ParticipantHello!
I am trying to achieve the following: I want to have a transparent navbar which is over the first column, so the text is in the picture. After scrolling down, I want that the navbar is not transparent anymore, but has is for example with white background (also the font colour of the main manu needs to change then).
Here is an example of what I want (just not with chaging font colour): http://conference.face.eu/
With the help of this forum I already achieved the transparent navbar. I used this code for custom css:
.x-navbar {
background-color: transparent !important;
border: 0;
}
.x-logobar{
background-color: transparent !important;
}
.masthead {
height:0px;
}Now I just need it to change the background, after scrolling down.
Thanks in advance!
Cheers!
September 25, 2016 at 9:54 am #1189784
ChristianModeratorHey there,
Upon checking the background is white once you’ve scrolled. Looks like you achieved what you need.
Thanks.
September 25, 2016 at 10:00 am #1189791
maheu88ParticipantSeptember 25, 2016 at 10:02 am #1189794
ChristianModeratorIn that case, please give us the URL of your site so we could check your setup.
Thanks.
September 25, 2016 at 10:12 am #1189796
maheu88ParticipantThis reply has been marked as private.September 25, 2016 at 10:48 am #1189816
RupokMemberHi there,
Thanks for the URL. I’d like to check but I am getting this on your site – http://prntscr.com/cm6pgc
Make sure it’s up and running.
September 25, 2016 at 10:49 am #1189817
maheu88ParticipantThis reply has been marked as private.September 25, 2016 at 11:05 am #1189826
RupokMemberHi there,
Thanks for writing back. I can see the effect on your site. So it seems you did it already. What else you need to fix?
Let us know.
September 25, 2016 at 12:06 pm #1189854
maheu88ParticipantWhen I scroll down, the navbar is still transparent. I need it to change to a white background (and other font colour) after scrolling down. Just as in the example….
September 25, 2016 at 4:14 pm #1189997
RadModeratorHi there,
Please check this other thread, https://community.theme.co/forums/topic/transparent-header-on-home-page-only/
Your CSS should be enough and it’s working, but your sample/ideal site triggers the transparency based on scroll position. With the code from that thread, you’ll just need to change the 200 value.
Thanks!
September 26, 2016 at 3:15 am #1190459
maheu88ParticipantWhich code do I have to use of this thread? There are many different codes.
September 26, 2016 at 3:20 am #1190468
ChristopherModeratorHi there,
Please add following code in Customize/Custom/JavaScript :
jQuery(document).ready(function($){ $('.x-navbar-fixed-top').addClass("transparent-navbar"); $(window).scroll(function(){ if ($(this).scrollTop() > 50) { $('.x-navbar-fixed-top').removeClass("transparent-navbar").addClass("white"); } else { $('.x-navbar-fixed-top').removeClass("white").addClass("transparent-navbar"); } }); });Add this CSS as well:
.white{ background-color:#fff; } .transparent-navbar{ background-color:transparent; }Hope it helps.
September 26, 2016 at 4:13 am #1190509
maheu88ParticipantNo, doesn’t help at all. After deleting my old code (as in my first post) the navbar was even not over the picture, but above in a white navbar. When adding your CSS to my old CSS it is just as before, but no effect with scrolling.
September 26, 2016 at 4:26 am #1190519
ChristopherModeratorHi there,
I’m not able check WP dashboard. It shows follwoing message after logging in :
Sorry for the inconvenience. Our website is currently undergoing scheduled maintenance. Thank you for your understanding.Please check.
Thanks.
September 26, 2016 at 5:02 am #1190579
maheu88ParticipantWhich user role do you need for checking? I will change it.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1189783 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
