Forums

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
    Posts
  • #36740
    ArchDesignLabs
    Participant

    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?

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

    Do you replace

    #96982

    Replace the default style sheet link with the above.

    #96983
    ArchDesignLabs
    Participant

    That part?

    #96984

    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.

    #97005
    visio
    Member

    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.

    #97032
    ArchDesignLabs
    Participant

    @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.