Conflict with IE7 CSS selector "*:first-child + html"

141 views
Skip to first unread message

luispunchy

unread,
Mar 15, 2012, 3:25:40 PM3/15/12
to selectivizr
I am working on a site where unfortunately I don't have access to
include an IE7-only style sheet via conditional comments. So for the
few tweaks I need to make for IE7, I am using the "star first-child"
selector to target specific elements for just IE7:

*:first-child + html [my element's selector here]

e.g. - *:first-child + html #myDiv {background:#ccc;}

I'm noticing that on initial page loading, the CSS rules applied with
that selector render on the page. Then there is the "flash" of
presentational change when the javascript is finally loaded and run
including the selectivizr script, and the CSS rules applied by that
selector go away.

So I'm guessing that selectivizr is conflicting with how that selector
works. Perhaps IE7 is seeing a new element injected in the DOM, above
the html element, thus making that selector no longer a match?

Anybody else see a similar issue?

Simon Balarabe

unread,
Mar 15, 2012, 3:45:56 PM3/15/12
to ie-...@googlegroups.com
I'm afraid I haven't do you have a "working" example ?
Reply all
Reply to author
Forward
0 new messages