Tagged: x
-
AuthorPosts
-
January 16, 2017 at 10:55 am #1332230
BradleyBParticipantHi,
I want to change the navbar and mobile menu dropdown background colors only when they are collapsed. How can I target them with css only after the navbar button has been pressed? Thanks so much! –
B
January 16, 2017 at 11:16 am #1332256
RupokMemberHi there,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. 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.
January 16, 2017 at 11:19 am #1332259
BradleyBParticipantThis reply has been marked as private.January 16, 2017 at 12:09 pm #1332339
JadeModeratorHi Bradley,
Please add this code in the JS customizer:
(function($){ $( ".x-btn-navbar" ).on( "click", function() { if ( $( ".collapse.in" ).length ) { $('.x-navbar-inner').css('background', 'transparent'); } else { $('.x-navbar-inner').css('background-color', '#4688d7'); } }); })(jQuery);Then add this in the custom CSS:
@media (max-width: 979px) { .masthead.masthead-inline { position: absolute; width: 100%; } }Hope this helps.
January 16, 2017 at 12:58 pm #1332432
BradleyBParticipantThank you so much! That worked! However, there is a new problem now: on mobile, the sliders and tops of all the pages are being cut off my the navbar. Please help! Any suggestions would be greatly appreciated! Thanks so much!
January 16, 2017 at 2:11 pm #1332511
BradleyBParticipantNever-mind –
I fixed it by adding a min-width to the css you provided. Thanks!
January 16, 2017 at 2:49 pm #1332567
JadeModeratorYou’re most welcome.
January 16, 2017 at 2:55 pm #1332579
BradleyBParticipantSorry for the back and forth, but I think I jumped the gun.i just rechecked the site on an iPhone, and he problem is still there – the header is overlapping he slider and page content on pages without sliders. Any ideas? Thanks again!
January 16, 2017 at 11:09 pm #1333046
Paul RModeratorHi,
Kindly change the css code provided from
@media (max-width: 979px) { .masthead.masthead-inline { position: absolute; width: 100%; } }to this
@media (max-width: 979px) { .home .masthead.masthead-inline { position: absolute; width: 100%; } }Hope that helps.
January 17, 2017 at 10:06 am #1333662
BradleyBParticipantI changed the code, but it did not solve the problem. Any other ideas? Thanks!
January 17, 2017 at 11:01 am #1333740
RupokMemberHi there,
Looks like you have another issue related to the header and make sure you are not mixing up the two issues – https://community.theme.co/forums/topic/nav-button-on-desktop-pushing-slider
Thanks!
January 17, 2017 at 11:12 am #1333759
BradleyBParticipantHi,
Thanks for the reply. Theses are two separate issues. The problem here is that the (uncollapsed) header bar covers the slider on iphones. On mobile, I want the header(uncollapsed). The other issue is related to the header menu when it is collapsed.
How can I make the slider sit exactly under the header on mobile? Thanks so much!
January 17, 2017 at 11:38 am #1333801
JadeModeratorHi there,
My apologies but the issues seem to be getting mixed up and confusing.
I tried checking on your site again but the previous request you had on this thread which was making the header transparent and change the background color when collapsed isn’t there anymore.
The code Paul provided should work as I have tested it as well.
Kindly carefully follow the suggestions and make sure you are not missing any opening or closing curly braces {} in the custom CSS.
January 17, 2017 at 12:37 pm #1333872
BradleyBParticipantThank you so much, sorry about the confusion That worked.
January 17, 2017 at 1:18 pm #1333921
JadeModeratorYou’re most welcome, Bradley.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1332230 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
