With HTML 4.01 DOCTYPE
#testdiv {
color:#666; font-size:smaller;
border:5px solid #c00;
padding:10px;
margin:20px;
width:400px; /* content only (total = 400+(2x5)+(2x10)+(2x20) = 470px) */
height:100px;
}
The browsers are fairly consistent in terms of reporting the width and height, where the dimensions returned include the content width, padding and borders (excluding the margins). However, IE5...
[Home]