This test case is for browsers, which support HTML 4.01 and the CSS2 separate borders model

[Back] [Test 0a] [Test 0b] [Test 0c] [Test 0d]
[Test 1] [Test 2] [Test 3] [Test 4] [Auto]

Test 1-4 test if the browser can handle the width CSS-property for the TABLE element correctly. According to CSS2 the width property means the content width. All kinds of possible borders and paddings are laid out of the width value. Because tables don't have direct actual content, the content width of the TABLE element is the total width of the widest TR, THEAD, TFOOT or TBODY elements. In my test pages the total width of the TR element. In order to show differences, I have used two width values.


table.testTable{border-collapse:separate;table-layout:fixed} + td.content{width:550px} + <TABLE style="width:550px; borderh:50px solid" cellspacing="0" cellpadding="0" class="testTable"> + <td class="content"> + <img src="WidthTest.gif" width="400" height="200" style="border-width:0">
Because there is not any kind of borders, and paddings or margins between the TABLE and and TD element the content width of the TABLE element is exactly the same as the content width of the TD element, which means that the content width of the table cell should be 150 pixel wider than the image.
New browsers renders this example at the same way. If the table use the automatic table algorithm (table-layout:auto) and the content width is defined to the TABLE element, most browsers render the content width incorrectly.
The image below the table shows the correct width of the entire TABLE element = the total width of the table = 650 pixel.


The left arrow --- the calculated content width: 550 pixel --- The right arrow

A content image
The correct total width of the table