Hi,
I am trying to display div boxes with specific heights and widths inline, but I am not having much success since display:inline divs seem to ignore specified height/widths.
[CODE]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html>
<head>
<title>testing</title>
<style>
div.box {
display:inline;
width:100px;
height:50px;
background-color:yellow;
border:1px solid;
padding:3px;
margin:3px;
}
img {
height:16px;
width:16px;
}
</style>
</head>
<body>
<div class=”box”>
<img/>
<span>some text</span>
</div>
<div class=”box”>
<img/>
<span>some text</span>
</div>
<div class=”box”>
<img/>
<span>some text</span>
</div>
</body>
</html>
That is the broken down problem. With that code, the divs are displayed inline, but the div isnt displayed properly since the width/height are disregarded (in ff and ie7) and the 1px border is screwed up (in ie7).
The annoying this is that is does EXACTLY what I want when you remove the doctype in ie7 (not much change in ff). So what is the solution to have divs with specified height/widths displayed inline?