Forum Moderators: not2easy
When I use either XHTML 1.0 - Strict or HTML 4.01 document type definition, the following code puts a space between every image and the edge of the div ONLY in Netscape 7.1 (that I have seem - also tested on Netscape 6 and IE 5 & 6):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style>
Div
{
margin:0px;
padding:0px;
background-color:#ffff90;
border: 0px;
}
</style>
</head>
<body>
<div><img src="visible_spacer.gif" width="5" height="50" /></div>
<div><img src="visible_spacer.gif" width="5" height="26" /></div>
<div><img src="visible_spacer.gif" width="5" height="174" /></div>
</body>
</html>
*NB a single pixel gif of any visible color called "visible_spacer.gif" is required for the above example
I have tried all the css styles I can think of to get the space to go away. If I remove the DOCTYPE the problem goes away, but I ideally need to use a strict doctype to confirm to accessibility standards.
Any help much appreciated.