473,387 Members | 1,485 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
0 4495

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Saiyan Vejita | last post by:
I am trying to add some padding to my table; that is, I want to add space between the red outer border and the content within. However, setting the "padding : 30px;" within the TABLE area of my...
15
by: Eric | last post by:
According to my book, the padding property is defined for all elements. However, when I set the property for the element <A>, only the left the right padding is applied and not the top and bottom...
5
by: Thomas Mlynarczyk | last post by:
Hello, I want to style an <a> element to have a special padding on "hover", like a {padding: 3px 5px 2px 4px;} a:hover {padding: 2px 4px 3px 5px;} No problem for Mozilla. Opera 7, however,...
6
by: Skip Hollowell | last post by:
I am working on a menu bar for a site, and am using buttons in the bar (because the customer wants to use accessKeys for each selection, apparently it is too much work to click on them with a...
0
by: Red | last post by:
This is apparently an ie display bug, I can't seem to figure out which ie bug this is. a 3 sided border is created by wrapping the 'inner' box in the 'middle' box and padding the 'middle' box...
8
by: cosmic foo | last post by:
<div style="width: 100px; padding-left: 10px; border: 1px solid Black;">padding</div><br> <div style="width: 100px; border: 1px black solid;">no padding</div> firefox increases the width of...
4
by: Mark.Larsen | last post by:
I'm still looking for a way to adjust the vertical location of the text in a TextBox without overriding the OnPaint. Any ideas?
36
by: phil-news-nospam | last post by:
Here is a simpler (no drop shadows) example of the padding bug I see: http://phil.ipal.org/usenet/ciwas/2006-05-08/buttons-1.html So far I find nothing in the CSS2 document that says I should...
14
by: Mark Shroyer | last post by:
I just noticed an unintuitive aspect of how nested blocks are positioned under a specific set of conditions, and although this is ostensibly correct behavior (unless Firefox, Safari, and Opera are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.