467,888 Members | 1,338 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,888 developers. It's quick & easy.

padding overlaps border of outer div

Red
See http://reenie.org/test9.php

There are two examples each with three nested divs.

The only difference between the two is that the first example has no
padding in the inner div, the second has 10px padding in the inner div.

The middle div has no padding and its black background should not show
up at all.

In firefox 0.9, the inner div's padding is simply added as it should be.
In Internet explorer 6.0, the inner div's padding causes the middle
div's black background to show, and it overlaps the bottom border of the
outer div.

Is there a workaround for this ? How can I add padding to the inner div
without losing the bottom border in internet explorer ?
Here is the code:

..inner1{
background-color: #FFFFFF;
}

..inner2{
background-color: #FFFFFF;
padding:10px;
}

..middle{
background-color:black;
}

..outer{
border-color: red;
border-style: solid;
border-width:5px;
}

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>
test9
</title>
<link rel="stylesheet" href="test9.css" type="text/css">
</head>
<body class="page">
example 1:<br>
<div class="outer">
<div class="middle">
<div class="inner1">
content
</div>
</div>
</div>
<br>example 2:<br>
<div class="outer">
<div class="middle">
<div class="inner2">
content
</div>
</div>
</div>
</body>
</html>
Jul 20 '05 #1
  • viewed: 4312
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Saiyan Vejita | last post: by
15 posts views Thread by Eric | last post: by
5 posts views Thread by Thomas Mlynarczyk | last post: by
6 posts views Thread by Skip Hollowell | last post: by
reply views Thread by Red | last post: by
8 posts views Thread by cosmic foo | last post: by
4 posts views Thread by Mark.Larsen | last post: by
36 posts views Thread by phil-news-nospam | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.