Grow your CSS skills. Land your dream job.

IE Conditional Tags in CSS stylesheet?

  • # May 23, 2013 at 9:50 am

    Hi all,

    I learned about IE conditional tags, but I was wondering is there a code to place them in the CSS Stylesheet as opposed to in my Header?

    # May 23, 2013 at 9:50 am

    Urgh, sorry guys, was trying to add code, and it wasn’t working. Wish I could delete the other 2 posts. My apologies, all.

    # May 23, 2013 at 10:04 am

    Code adjusted and previous posts deleted.

    I do question what it is you are trying to achieve though.

    `filter` is not supported by IE at present and thus would be ignored.

    # May 23, 2013 at 10:12 am

    @robertallen, use the IE conditional tags to add an IE only class to the body. Then you can control styling through your .css file.

    http://css-tricks.com/snippets/html/add-body-class-just-for-ie/

    # May 23, 2013 at 12:10 pm

    Thank you guys.

    Well I was learning that it’s best if all CSS styles are kept in a stylesheet and not inside a header. This was the only one that I had that was a bit different than the rest.

    But, like you mentioned, Paulie, it looks like I don’t even need to bother with this.

    I read also that it’s faster on browsers if all CSS and Javascript is combined into one file rather than multiple files. I don’t honestly see how that’s faster, but I’m willing to try it if it does work.

    Thank you guys again!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".