[thelist] CSS2 Child selectors in IE5/Win

jeff jeff at members.evolt.org
Mon Apr 9 23:56:00 CDT 2001


: From: Joshua Olson
: I am running IE5.0 and the example given
: seems to work.

my curiosity piqued, i decided to run a couple more tests to see if it
really does work and if so, to what degree.  i noticed a problem with the
previous example because there wasn't any code on the page which fell
outside of the selector/id combination which would indicate whether it was
actually working or not.  so, i threw together the following example.

div > #neato1 {
color: blue;

  <h1 id="neato1">neato</h1>
    <h1 id="neato2">blue neato</h1>

in browsers that support child selectors, the above bit of code should be
rendered as 2 default colored <h1> blocks of text.  this is the case with
nn6 and opera5.  in ie5.0 however, the first <h1> is rendered with blue text
and the second in the default color.  this indicates to me that ie5.0 is
ignoring the first part of the declaration, "div > ", and skipping right to
the second part, "#neato1" -- which would also suggest why a lack of
whitespace would make it appear to not work as it can't find anything in the
document identified in some fashion as "div>#neato1".

kinda disappointing.  ah well, for all the other things you can do *easily*
in ie5, i'll gladly trade this.



mailto:jeff at members.evolt.org

More information about the thelist mailing list