Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #314046

    Hi,
    I need to add specific behavior to IE.
    I added the following code to header.php but it seems not to work in IE. (cache cleared).

    `
    <!–[if IE]>
    <link rel=”stylesheet” href=”<?php echo get_stylesheet_directory_uri() ?>/ie.css” media=”screen” type=”text/css” />
    <![endif]–>

    <!–[if IE]><h1>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</h1><![endif]–>

    <!–[if IE]>
    Non-IE browsers ignore this
    <![endif]–>
    `
    Anyone knows the solution?

    Thanks
    M

    #314293

    Hi!

    Not sure why that code doesn’t work, try using this plugin: http://wordpress.org/plugins/ie-css-definer

    Cheers!
    Josue

    #315149
    This reply has been marked as private.
    #315443

    Hey!

    I think you are using the wrong comment, refer:
    http://stackoverflow.com/questions/13785587/if-ie-not-working
    http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

    Please note that this is not a theme issue at all.

    Regards,
    Josue

    #315703

    Ohh I forgot that IE10+ does not support CC :)

    I used the following in my style.css:

    
    
    /*############# IE 10/11 ####################*/
    @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {  
       /* IE10+ specific styles go here */  
       body{background: green;}
    
    /*############# IE 10/11 ####################*/
    

    THANKS J!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Adding if IE’ is closed to new replies.