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]

Test 0a-0d test if the browser can handle the width attribute for the TABLE element correctly situations, where borders are given either with HTML or CSS. According to the HTML 4.01 specification the width attribute means the width of the entire table = the total width. Possible borders and paddings are calculated inside the width value of the TABLE element. The calculated content width is then subtracting borders and paddings from the total width. In order to show differences, I have used several values.


<TABLE width="525" border="50" cellspacing="0" cellpadding="0"> + <img src="WidthTest.gif" width="400" height="200" style="border-width:0">
Because the border attribute creates borders both for TABLE and TD elements, the content width of the TD element is calculated at the following way:
525-((2x50)+(2x1) = 423, which means that it should be 23 pixed wider than the image.
The image below the table shows the correct width of the entire TABLE element = the total width of the table = 525 pixel.


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

A content image
The correct total width of the table