The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Multiple style sheets in WordPress

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #36740

    I have read about a dozen articles from sources all of the web and can not seem to find the solution I need. I am basically trying to say that if the browser size is above 1200px refer to largestyle.css and below 1200px refers to smallstyle.css. Does anyone have a smart solution or article?

    <link rel="stylesheet" href="smallstyle.css" media="(max-width: 1200px)">
    <link rel="stylesheet" href="largestyle.css" media="(min-width: 1200px)">

    Do you replace


    Replace the default style sheet link with the above.


    That part?


    Yes. Just make sure to get the path to the new style sheets correct.

    Also, I have assumed that you are using a HTML5 doctype, and as such, removed the trailing slash, and the type attribute.


    First you make a folder name css in your theme, then in your main style.css just import css files e-g @import url(‘css/basic.css’); as it is import other files.


    @visio your basically using media queries right? My question would be how does the site know which stylesheet to use when the browser is resized if you are just @importing them into the main stylesheet? Would you still not have to do what @joshuanhibbert is saying?

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Back End’ is closed to new topics and replies.