Re: possible CSS spec flaw with Sibling Selector and rowspans

On Fri, Feb 13, 2009 at 6:19 AM, Olivier GENDRIN
<olivier.gendrin@gmail.com> wrote:
> <html>
> <head>
> <style>
> td {background: red;}
> td + td {background: blue;}
> </style>
> </head>
> <body>
> <table>
> <tbody>
> <tr>
> <td rowspan="2">I'm red</td>
> <td>I'm blue</td>
> </tr>
> <tr>
> <td>I'm red but shouldn't I be blue ?</td>

No.  The + combinator cares only about the DOM.  rowspan is just an
attribute like any other and does not affect which elements are
siblings of which other elements from the perspective of CSS,
JavaScript, etc.

Received on Friday, 13 February 2009 12:32:23 UTC