Tagged: x
-
AuthorPosts
-
June 22, 2016 at 9:46 am #1054425
nonprofitworkParticipantBuilding a site off of the Education Demo (http://demo.theme.co/education/)
How would I go about make the nav on mobiles fixed so that it remains at the top of the screen as users scroll the site?
Thanks for your time and help 🙂
June 22, 2016 at 10:46 am #1054510
DarshanaModeratorHi there,
Thanks for writing in! Head over to Appearance -> Customize -> Header and set “Navbar Position” as Fixed Left.
Hope that helps.
June 22, 2016 at 10:51 am #1054520
nonprofitworkParticipantThanks for the speedy reply.
That solution won’t work. By doing that the nav bar on desktops is changed from fixed on the left to fixed on top.
I want to leave the desktop version of the left nav bar unchanged, while changing the mobile nav to fixed at the top.
June 22, 2016 at 12:07 pm #1054653
Nabeel AModeratorHi again,
Can you please provide the URL so we can take a look?
Thanks!
June 22, 2016 at 12:29 pm #1054691
nonprofitworkParticipantThe url to see the issue is http://demo.theme.co/education/
(I started the site I’m working on with the demo content of that theme and have made no changes to it)The desktop version works great, it’s the mobile nav that I’d like to fix to the top.
June 22, 2016 at 1:55 pm #1054876
JoaoModeratorHi There,
Please add the following code to Appereance Customizer Custom CSS
@media (max-width: 979px) { .x-navbar-fixed-top, .x-navbar-fixed-left, .x-navbar-fixed-right { position: fixed; } }Hope that helps,
Joao
June 22, 2016 at 5:45 pm #1055221
nonprofitworkParticipantIt did not work. By putting that code in, the left bar nav bar (the one found on the desktop version) remains active on smaller and mobile screens.
June 22, 2016 at 6:38 pm #1055262
nonprofitworkParticipantThis reply has been marked as private.June 22, 2016 at 11:41 pm #1055753
LelyModeratorHi There,
Thank you for the credentials.
Please update above CSS to this:@media (max-width: 979px){ .x-navbar-fixed-top, .x-navbar-fixed-left, .x-navbar-fixed-right { position: fixed; width: 100% !important; bottom: initial; } }See attached screenshot.
June 23, 2016 at 8:13 am #1056274
nonprofitworkParticipantThanks so much this works great, I really appreciate the help.
Is a way to add padding so that the nav does not lay overtop the first 70px of each pages content?
June 23, 2016 at 10:24 am #1056466
JoaoModeratorHi There,
Please add the following code to Appereance Customizer Custom CSS
@media (max-width: 979px){ .x-header-landmark { padding-top: 70px; } }Hope that helps,
Joao
June 23, 2016 at 11:29 am #1056592
nonprofitworkParticipantThat solution won’t work because it only works on the specific page that has x-header-landmark on it.
I’m looking for a way to add make sure that the fixed nav does not fall on top of content at the top of all pages.
For example of the problem persisting see http://www.non-profit.work/example-x1/?page_id=14 (because it does not have x-header-landmark the solution will not work).
June 23, 2016 at 2:22 pm #1056828
nonprofitworkParticipantI found a solution by adding the following custom css
@media (max-width: 979px) { .x-main.full, .x-main.left, .x-main.right, .x-sidebar.left, .x-sidebar.right { float: none; display: block; width: auto !important; margin-top: 70px; } }Thank you for all the help 🙂
June 23, 2016 at 2:26 pm #1056834
Nabeel AModeratorHi again,
Use this code instead:
@media screen and (max-width: 979px){ header.masthead.masthead-inline { min-height: 70px !important; } }This should fix the issue. Let us know how this goes!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1054425 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
