Two css files in wordpress!

Discussion in 'CSS' started by noobie2shoes, Jun 9, 2009.

  1. #1
    Hi All,

    I was hoping to use 2 different css files in wordpress:

    I have created both css files and uploaded.

    <style type="text/css" media="screen">
    <!-- @import url( <?php bloginfo('stylesheet_url'); ?> ); -->
    </style>
    Code (markup):
    Page is currently pulling css from the above code but I was wanting the code to be pulled from css2?

    What should I change in the above code to pull css data from css2?
     
    noobie2shoes, Jun 9, 2009 IP
  2. markupdude

    markupdude Peon

    Messages:
    215
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The default is style.css right? And you have the below line to apply that default stylesheet

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

    So in similar fashion, you add this line and correct path to your additional stylesheet

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

    Make sure to give correct path in place of cssfolder/morestyle.css

    Notice the difference between stylesheet_url and template_url.
     
    markupdude, Jun 9, 2009 IP
    noobie2shoes likes this.
  3. ThomasHardy

    ThomasHardy Peon

    Messages:
    68
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    As Markupdude said, just declare it in the head and providing you don't have a clash of any ID's or Div's you will be fine.
     
    ThomasHardy, Jun 10, 2009 IP
  4. noobie2shoes

    noobie2shoes Peon

    Messages:
    704
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks guys 1+
     
    noobie2shoes, Jun 10, 2009 IP
  5. digitalnature

    digitalnature Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    or easier, import the 2nd stylesheet in style.css:
     
    digitalnature, Jun 11, 2009 IP