has anyone had any experience with thin images in the html box model?
ie
this code is killing me:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<img src="myimage1.jpg" border="1" /></div>
<img src="myimage2.jpg.jpg" border="1" />
</body>
</html>
where both images are like 6px height and 960px wide
in a standard box model ie:
<html>
<head>
</head>
<body>
<img src="myimage1.jpg" border="1" /></div>
<img src="myimage2.jpg.jpg" border="1" />
</body>
</html>
this works as expected
can someone tell me how to make number 1 work like number two
I am going to guess what you are encountering.
What is happening –
Modern browsers/parsers, especially picky ones like Chrome will try to repair your code instead of ignoring the /div to make it semantic. If you are using developer tools, right click to inspect the element and you may notice that the browser has added a
<div></div>This is defined by the html5
<!DOCTPE html>which will make sure the browser forces it into a more strict mode rather than a quirks modeAlso
changing the css for the image in the strict mode
display:block;orvertical-align:bottom;will give you something similar to the quirks version