DOCTYPE's affect on div's borders

liunx

Guest
I changed the the DOCTYPE parameter on my application to 4.01 Transitional (DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">), and that caused the borders on my div sections disappeared. Why? How do I get them back?

I'm using IE 6, and here's the code:<div style="border:2 solid black; padding:5px; ">
<span style="font:bold 11px arial"> ...blah, blah, blah. </span>
</div >
<br><br>
<div style="border:1 solid black">
<table ><tr><td colspan=2>
<span style="font: 12pt Time New Roman; ...">
Search Parameters</span></td></tr>
<tr><td>Country: </td><td>Canada</td></tr>
</table >Answer: 4.01 Transitional does not accept "2" or "1" as border widths. They must be "2px" and "1px", for example:

<div style="border:2px solid black; padding:5px; ">
<span style="font:bold 11px arial"> ...blah, blah, blah. </span>
</div >
<br><br>
<div style="border:1px solid black">
<table ><tr><td colspan=2>
<span style="font: 12pt Time New Roman; ...">
Search Parameters</span></td></tr>
<tr><td>Country: </td><td>Canada</td></tr>
</table >indeed, and more generally: always put units, except when it's null, it's not needed, or in the line-height property
 
Back
Top