CSS media queries allow you to apply different sets of CSS rules based on conditions like browser width or device type. Most commonly, media queries are used to create a responsive design, where different CSS styling is applied to different screen sizes. This lets designers craft sites that are pleasant to use and easy to read — even on very small screens — without creating completely separate mobile websites or themes. Newer themes are usually built with a responsive layout.
Styling for Mobile
How To Convert Your WordPress Theme To Responsive Design
Having a responsive website is incredibly important. This tutorial is especially important if you are still running a static theme that you want to make responsive. Doing so can often be easier than taking an already responsive theme and customizing it to fit your design. However, even if you are merely interested in learning how to implement responsive design in practical terms, this is the article for you. From here, we will learn how to use the above to turn a static WordPress theme into a responsive one. Be aware, however, that while the principles stay the same, your theme might be built differently than the examples below. Therefore, consider this only as the broad strokes. You might have to do some custom work for your own site. Btw, have you checked out our collection of development tools yet? You might also want to consider setting up your site in a local development environment so you can experiment with making it responsive without messing with your live site.
It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search. Trying to make some CSS changes, that will only affect view on mobile phones. I made changes below, but it also affects desktop views. People who code: we want your input. Take the Survey. Sign up to join this community.
Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. I working on a website which has vertical navigation menu on left side. So is there any other solution from which the css should apply only for desktop view. Use media queries.