Tagged: x
-
AuthorPosts
-
September 12, 2016 at 12:18 pm #1171710
gselwayParticipantI have been using posts within the forum to good effect, managing to pinch some code to get the desired transparent header look on my home page. However I do not want this replicated on all my other pages and have no clue how to prevent this.
Please can you help?
Gavin
September 12, 2016 at 12:19 pm #1171716
gselwayParticipantThis reply has been marked as private.September 12, 2016 at 12:28 pm #1171740
ThaiModeratorHi There,
Please add the following CSS:
body:not(.home) .x-navbar { background-color: #fff !important; }Hope it helps 🙂
September 12, 2016 at 12:54 pm #1171796
gselwayParticipantFantastic – Thank you very much!
September 12, 2016 at 1:32 pm #1171849
Prasant RaiModeratorYou are most welcome. 🙂
September 14, 2016 at 10:35 am #1174958
gselwayParticipantA little more help required please.
I need my sub menu (drop down on smaller screens) to be white rather than transparent as it is not easy to read.
I’ve tried to use some code I found on the forums but it has not worked.
Gavin
September 14, 2016 at 11:52 am #1175086
ThaiModeratorHi There,
Try adding the following CSS:
@media (max-width: 979px){ .x-navbar { background-color: #fff !important; } }Hope it helps 🙂
September 14, 2016 at 1:59 pm #1175270
gselwayParticipantThank you.
It works but also causes the transparency to disappear on smaller screen when the sub menu drop down is not selected.
September 14, 2016 at 6:44 pm #1175604
JadeModeratorHi there,
Please update the code to:
@media (max-width: 979px){ body:not(.home) .x-navbar { background-color: #fff !important; } }Hope this helps.
September 20, 2016 at 3:46 am #1182816
gselwayParticipantHi sorry for the late reply.
The above code makes the mobile sub menu drop transparent again.
I’m trying the keep the header transparent on all devices, however I want the sub menu drop down on mobile (smaller devices) to have a white background.
Thanks Gavin
September 20, 2016 at 4:30 am #1182862
Paul RModeratorHi Gavin,
Please do this instead
Add this under Custom > Javascript in the Customizer.
jQuery(function($) { $('.x-btn-navbar').on( "click touchstart", function() { $('.x-navbar').toggleClass('x-navbar-solid'); }); });Then add this in custom > css
.x-navbar-solid { background-color: #fff !important; }Hope that helps
September 20, 2016 at 5:56 am #1182975
gselwayParticipantHi
It’s not quite working.
It is now behaving quite strange. Sometimes the header is transparent, other times it is white. Likewise the sub menu drop down changes between transparent and white.
September 20, 2016 at 6:05 am #1182985
ChristopherModeratorHi there,
Please remove JS and CSS we’ve provided in previous replay.
And add this code:
@media (max-width:979px){ ul#menu-primary-menu-1 { background-color: #fff; padding: 10px; } }Hope it helps.
September 20, 2016 at 7:39 am #1183056
gselwayParticipantHi,
It’s getting closer, however the drop down now feels like it’s disconnected to the rest of the header.
Upon selection of the drop down I would like the header and sub menu to turn white but then go back to transparent when de-selected, if possible.
Thank you for your help!
September 20, 2016 at 8:28 am #1183126
Paul RModeratorHi,
Upon checking, it seems to be behaving that way.
Please check – http://screencast.com/t/9B5iUv8iVLiY
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1171710 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
