[BNM] :first-child selector and IE7
James Wragg
james.wragg at gmail.com
Thu May 17 13:35:45 BST 2007
Hi BNM,
I'm having a weird one with child selectors and the :first-child
pseudo selector and wondered if anyone can give me a hand?
Basically what I want to do is select the first element/tag within a
div, no matter what it is. This seems simple, and it is in FF/Opera
(not sure of Safari), using the following selector:
#mydiv > *:first-child { margin-top: 0 }
And although I wouldn't expect this to work in IE6 and below, I would
expect it to work in IE7 as it apparently supports it[1] but I can't
get it to work.
Has anyone else come up against this, or am I doing something wrong?
Cheers,
James
[1] http://blogs.msdn.com/ie/archive/2006/08/22/712830.aspx
More information about the BNMlist
mailing list. Powered by Wessex Networks