Forums

how do i use multiple stylesheets in a theme? (4 posts)

  1. riotriotstar
    Member
    Posted 6 years ago #

    i wish to use more than one stylesheet for the theme i am making.

    i have the following stylesheets
    style.css
    images.css
    colours.css
    IE.css
    IE5mac.css

    but this following piece of code only picks up one style sheet.. the style.css file.

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    how do i change it to add the other stylesheets?

  2. Joshua Sigar
    Member
    Posted 6 years ago #

    Just hardcode them in the head section

    <style type="text/css" media="screen">
    @import url( "<?php echo TEMPLATEPATH ?>/images.css" );
    ...
    </style>

  3. jonimueller
    Member
    Posted 6 years ago #

    And that's one of the thrills of having theme-specific templates! Putting that code in the head of your template won't affect any of your other themes, unless you want it to (in which case you'd just place the code there, too).

    J

  4. jalenack
    Member
    Posted 6 years ago #

    or, more simply, in your style.css, @import the rest of the files

    @import url("images.css");
    @import url("colours.css");
    etc..

    The nice thing that css works out of its own directory, so you can use these relative URIs with no problem

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.