Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I noticed for the styles sheets there are proper selectors for less than IE9. But unfortunately, if we want to target everything less than IE10 (lte IE10) it doesn't seem to work. Basically, this becomes useful when dealing with cusotm form selects (since IE still does not allow a hidden selector). I'm sure that they are other issues also.
Is there some quick fix I could add as I tried setting lte IE10 but that never gets targetted.
Thanks heaps!
Comments
Comment #2
ShaneOnABike CreditAttribution: ShaneOnABike commentedOkay so I cleared the cache and I think that after I re-saved the settings on the theme page that's when everything got regenerated and registered.
I have noticed though that the responsive css is not being initiated on IE... is that normal? If I have a CSS sheet for IE9 and lower does this mean that responsive won't be initiated also?
Comment #3
ShaneOnABike CreditAttribution: ShaneOnABike commentedOkay I managed to get this working but I think it comes down to a documentation issue because it's not exactly that clear online.
If you want to target less than IE9 you would put
ie_stylesheets[screen][lt IE 9][] = css/lt-ie9.css
and if you would like to target IE 8 and above you would use
ie_stylesheets[screen][gt IE 8][] = css/gte-ie8.css
Finally I have
ie_stylesheets[screen][gt IE 8][] = css/gte-ie8.css
ie_stylesheets[screen][lt IE 9][] = css/lt-ie9.css
AND even more importantly.. you cannot use the same css file in both cases. I found that when this was done the second style sheet inclusion is 100% ignored.
Comment #4
Jeff Burnz CreditAttribution: Jeff Burnz commentedWell, conditional comments won't work in IE10 and up, to be frank I have never tested it out as I very rarely use them any more.
I have just setup a new machine with Windows 10 and IE11 so I will be doing some testing in the coming weeks with IE10 and 11, I can comment back here when I have put them through the ringer and come up with some strategy.
Comment #5
ShaneOnABike CreditAttribution: ShaneOnABike commentedYeah looks like I am coming back to this again with another project did you ever have any progress with this cause I find I cannot select upper version and TRAGICALLY (and no suprise) some of the code that I am doing needs hacks to make it work in gawd awful Internet Exploder
Comment #6
ShaneOnABike CreditAttribution: ShaneOnABike commentedHere's a potential solution...
From: https://philipnewcomer.net/2014/04/target-internet-explorer-10-11-css/