SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Conditional CSS statements in Wordpress

    Hey,

    How can i write a conditional css statement when using wordpress?

    I currently have this but it does not work:-

    Code:
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
    
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="IE7.css" />
    <![endif]-->
    Thanks

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What does not work about it? It should work. Is this in header.php or in whatever theme file you have the <head></head> area in?

    The only thing I notice is that the path to the IE7.css file might need some help to locate it.
    Code HTML4Strict:
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
     
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/IE7.css" />
    <![endif]-->


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •