If there are two absolutely positioned divs on the page, the innermost of which has content that should be displayed as a table, Firefox 3.6.x and 4.x, Chrome 13.x and Opera 11.x - all this refers to the fragmentation of content.
Test case:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Nested Absolutes</title> </head> <body> <div style=" position: absolute; background-color: green;"> <div style="position: absolute;"> <div style="display: table;"> <div style="display: table-column; width: 15px;"></div> <div style="display: table-column;"></div> <div style="display: table-row;"> <div style="display: table-cell; background-color: blue;"></div> <div style="display: table-cell;"> Banana Fritter </div> </div> <div style="display: table-row;"> <div style="display: table-cell; background-color: red;"></div> <div style="display: table-cell;"> Cherry Pie </div> </div> </div> </div> </div> </body> </html>
Expected Result ([C] means color block C):
[B] Banana Fritter
[R] Cherry Pie
Will produce output:
Banana
fritters
Cherry
Pie
Divas with clearly stylized 15px widths were excluded from the view, and unnecessary line breaks were applied in any text context.
If any of the external sections has its position changed to "relative", the content layout is restored to the expected layout.
Why is the use of two nested, absolutely positioned divs provoking a browser layout mechanism for rendering child divs with styling enabled, ignored, and the content forced as little space as possible?
** UPDATE **
The simplest example that avoids table complications ( fiddle ):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Nested Absolutes</title> </head> <body> <div style=" position: absolute; background-color: green;"> <div style="position: absolute;"> <div> Banana Fritter </div> </div> </div> </body> </html>
Expected Result:
Banana fritter
Displayed output:
Banana
Fritters
Giles burdett
source share