Set mobile responsive breakpoint
cherryfivers
Registered Users Posts: 6 Big grins
Hello! I have searched the forums but cannot seem to find an answer to the following question: I would like to manually control the pixel width when the mobile responsive layout of my web page kicks in. For example, right now, the NAV layout seems to switch from desktop to mobile at width=640px and I would like to set this threshold differently.
Could someone kindly help me with the CSS to set this breakpoint? Thanks in advance!
www.cherryfivers.com
Could someone kindly help me with the CSS to set this breakpoint? Thanks in advance!
www.cherryfivers.com
0
Comments
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com
Thanks for the help - I had seen that article before. All I want to do is change the pixel width at which point the "desktop" nav (currently a left-sidebar menu) switches to the "mobile" nav (top bar accordion menu). From that article I'm not entirely sure how to accomplish this.
@media only screen and (max-width: 1000px) {
/* Hide the left nav bar for screens that aren't large enough */
.sm-page-layout-region-left { display: none; }
/* Move the center of the page to the left edge of the screen */
.sm-page-layout-region .sm-page-layout-region-center { margin-left: 0px !important; }
}
All I need is help on displaying the mobile nav at the top of the page for screens less than 1000px. Currently, the mobile nav does not display until screen size is < 670px
Help appreciated!!
But what you can do is to code your own navigation for screens that are 1000px and narrower. Simpy copy what SM has when they hit 670px point. Hide it on wider screens while displaying your left sidebar. Once you are at 1000px - hide left side bar and show (un-hide) your own "mobile" nav. I have something similar on one of my websites - hiding and showing menus based on the width of the screen.
tailoredportraits.com
tailoredportraits.com
Always glad to meet another Capital District photographer! Cheers!
tailoredportraits.com