<ole>
Prøv disse to dokumenter:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>TITLE</title>
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
div {
width: 200px;
height: 200px;
background: yellow;
}
.withBorder {
border: 50px solid red;
}
</style>
</head>
<body>
<div>Blabla</div>
<div class="withBorder">Blabla</div>
</body>
</html>
------------ og -------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>TITLE</title>
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
div {
width: 200px;
height: 200px;
background: yellow;
}
.withBorder {
border: 50px solid red;
}
</style>
</head>
<body>
<div>Blabla</div>
<div class="withBorder">Blabla</div>
</body>
</html>
- så er det tydeligt at se, hvad der sker (og skal ske), når man bruger den fulde DTD. Læg mærke til, at det første dokument vises ens i FF og IE. Det sidste vises forkert i IE, men korrekt i FF.
Borders og padding _skal_ lægges til bredde og højde. Sådan er CSS indrettet ... like it or not ;o)
/mvh
</bole>