Export (0) Print
Expand All
Expand Minimize

2.2.65 [CSS-Level2-2009] Section 17.6.2.1, Border conflict resolution

V0287:

The specification states:

In the collapsing border model, borders at every edge of every cell may be 
specified by border properties on a variety of elements that meet at that edge 
(cells, rows, row groups, columns, column groups, and the table itself), and these 
borders may vary in width, style, and color. 

Quirks Mode and IE7 Mode (All Versions)

The border property is not supported for the following elements:

table-row-group (tbody)
table-row (tr)
table-column (col)
table-column-group (colgroup)

V0288:

The specification states:

1.  Borders with the 'border-style' of 'hidden' take precedence over all other 
conflicting borders. Any border with this value suppresses all borders at this 
location.

Quirks Mode and IE7 Mode (All Versions)

The hidden value does not take precedence over any other border style. Borders are displayed at this location.

V0289:

The specification states:

3. If none of the styles are 'hidden' and at least one of them is not 'none', then 
narrow borders are discarded in favor of wider ones. If several have the same 
'border-width' then styles are preferred in this order: 'double', 'solid', 
'dashed', 'dotted', 'ridge', 'outset', 'groove', and the lowest: 'inset'.

Quirks Mode and IE7 Mode (All Versions)

Border conflicts among borders of the same thickness are not resolved. The border for each cell is drawn beginning from left to right, from the top row to the bottom row. After the first cell border in the row is drawn, the next cell border is drawn over the previous border. In some cases, this behavior results in a combined border. For example, if the cell on the left has a solid red border and the adjacent cell on the right has a double black border, the border the two cells share appears as a double black border with red in the space between the two lines. However, if the cell on the left has the double border and the cell on the right has the solid red border, the border the two cells share appears as a solid red border. Note that in rtl mode, the cell borders are drawn from right to left, top to bottom so that the border that appears on top is reversed.

V0290:

The specification states:

4. If border styles differ only in color, then a style set on a cell wins over one 
on a row, which wins over a row group, column, column group and, lastly, table. 
When two elements of the same type conflict, then the one further to the left (if 
the table's 'direction' is 'ltr'; right, if it is 'rtl') and further to the top 
wins.

Quirks Mode and IE7 Mode (All Versions)

Borders that are set on the table will win over those that are set on the cells.

Show:
© 2014 Microsoft