Grow your CSS skills. Land your dream job.

Conditional for IE9

  • # March 10, 2011 at 10:09 pm

    Hi guys!
    I use a flashfallback exclusively for IE-users on my HTML 5 website that contains video in a


    < ?php if(strpos($_SERVER, 'MSIE') !== false) { ?>



    < ?php } else { ?>



    < ?php } ?>

    It has worked pretty good. With IE9 things are getting more complicated. I want to exclude IE9 which is capable of HTML 5 from the if-area but keep the fallback for visitors with Windows XP, i.e. IE < = 8. My PHP is poor. Can anyone help me?

    Thanks alot.
    Runa

    # March 10, 2011 at 11:51 pm

    You can wrap it in this HTML:


    # March 11, 2011 at 9:58 am

    Okay, I should have mentioned that the simplest way doesn’t work out. There will remain two video-elements in the DOM then. The other one cannot be removed so easily. There will be no video neither in IE8 nor IE9 then.

    # March 11, 2011 at 11:21 am

    Here are all the ways to target IE. The last one rocks. http://www.visibilityinherit.com/code/target-ie.php

    # March 11, 2011 at 11:36 am

    I don’t get why you can’t do that. You above code can be achieved in html by doing this:





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".