WordPress.org

Ready to get started?Download WordPress

Forums

IF IE statement changes to different theme (5 posts)

  1. kopax
    Member
    Posted 2 years ago #

    Hello,

    I am working on a wordpress website in local.

    I am using a lot of css3 attributes, and the rendering on IE9 is a mess.

    I can't correct this with a special css stylesheet for IE, so i'm juste thinking about making a custom theme for IE.

    Is it possible to detect and swap the theme when a user is using IE9 or older ?

    I can't find a lot of documentation about that, sorry if the answer is already in this forum

  2. Andrew
    Forum moderator
    Posted 2 years ago #

    I misread.

  3. kopax
    Member
    Posted 2 years ago #

    Thanks a lot for your answer, but has I said,

    I can't correct this with a special css stylesheet for IE

    A custom css for IE is not enough.

  4. Andrew
    Forum moderator
    Posted 2 years ago #

    You can include another stylesheet for certain Internet Explorer browsers using HTML or JavaScript.

    Look at this example for HTML conditional statements
    http://www.quirksmode.org/css/condcom.html

    Instead of stylesheets, use your HTML.
    E.g

    <!--[if IE 9]>
    <a href="#" title="Seen in IE9 only">...</a>
    <![endif]-->
  5. kopax
    Member
    Posted 2 years ago #

    Thanks for your answer again,

    For now this is the only solution I have in mind, but it doesn't improve code readability.

    I'm really looking for a way to change theme when I detecte another browser.

Topic Closed

This topic has been closed to new replies.

About this Topic