2.2.19 [CSS-Level2-2009] Section E.2, Painting order

C0061:

The specification states:

 4. For all its in-flow, non-positioned, block-level descendants in tree order: If the element is a block, list-item, or other block equivalent: 
 1. background color of element. 
 2. background image of element. 
 3. border of element. 
 Otherwise, the element is a table: 
 1. table backgrounds (color then image). 
 2. column group backgrounds (color then image). 
 3. column backgrounds (color then image). 
 4. row group backgrounds (color then image). 
 5. row backgrounds (color then image). 
 6. cell backgrounds (color then image). 
 7. all table borders (in tree order for separated borders).

All Document Modes (All Versions)

The border of a table cell is rendered on top of the content of that cell.

C0062:

The specification states:

 1. Otherwise: first for the element, then for all its in-flow, non-positioned, block-level descendants in tree order: 
 1. If the element is a block-level replaced element, then: the replaced content, atomically. 
 2. Otherwise, for each line box of that element: 
 1. For each box that is a child of that element, in that line box, in tree order: 
 1. background color of element. 
 2. background image of element. 
 3. border of element. 
 4. For inline elements: 
 1. For all the element's in-flow, non-positioned, inline-level children that are in this line box, and all runs of text inside the element that is on this line box, in tree order: 
 1. If this is a run of text, then: 
 1. any underlining affecting the text of the element, in tree order of the elements applying the underlining (such that the deepest element's underlining, if any, is painted topmost and the root element's underlining, if any, is drawn bottommost). 
 2. any overlining affecting the text of the element, in tree order of the elements applying the overlining (such that the deepest element's overlining, if any, is painted topmost and the root element's overlining, if any, is drawn bottommost). 
 3. the text. 
 4. any line-through affecting the text of the element, in tree order of the elements applying the line-through (such that the deepest element's line-through, if any, is painted topmost and the root element's line-through, if any, is drawn bottommost). 
 2. Otherwise, jump to 7.2.1 for that element. 
 For inline-block and inline-table elements: 
 1. For each one of these, treat the element as if it created a new stacking context, but any positioned descendants and descendants which actually create a new stacking context should be considered part of the parent stacking context, not this new one. 
 1. For inline-level replaced elements: 
 the replaced content, atomically. 
 Some of the boxes may have been generated by line splitting or the Unicode bidirectional algorithm. 
 2. Optionally, the outline of the element (see 10 below). 
 3. Optionally, if the element is block-level, the outline of the element (see 10 below).

All Document Modes (All Versions)

The border of a table cell is rendered on top of the content of that cell.

Show: