1 reply [Last post]
nhamel
Offline
newbie
Last seen: 11 years 36 weeks ago
Joined: 2003-04-08
Posts: 1
Points: 0

Hi all,

i have problems using div containers including graphics.

Here is the example:

<HTML>
<HEAD>
<style type="text/css"><!--
#pic {
position:absolute;
left:450px; top:350px; width:300px; height:143px;
background-color:#efefef;"
}
// --></style>
</HEAD>

<div id=pic>

</div>

</HTML>

The div container has exactly the same height as the picute loaded into it.

Nevertheless, MSIE shows a small (2-3 px) border in teh background color at the bottom of the picture. Mozilla shows everything right.

Could someone give some hints?

Tnx
Norbert

dJomp
dJomp's picture
Offline
Enthusiast
York, England
Last seen: 11 years 39 weeks ago
York, England
Joined: 2003-03-23
Posts: 422
Points: 0

MSIE enlarges div containers

Suprisingly, a similar problem to [url=http://www.csscreator.com/css-node/51 thread about the <li> tag[/url]

Setting your code out as follows:

<div id=pic><img...></div>

removes the problem. IE does like to print whitespace wherever it can!

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.