473,543 Members | 2,065 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4504

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

Similar topics

1
15968
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 CSS doesn't seem to be having any affect. Is there a way to add padding to a table via CSS? I can use <table CELLSPACING=>, but it's a rather...
15
2242
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 padding. I checked a couple of other browsers and couldn't find any that implemented top and bottom padding for the <A> element, assuming I have...
5
14504
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, behaves strangely and does not apply the background color to the padded area. And IE5 seems to ignore the hover-padding.
6
7542
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 mouse, but I digress) It seems that the longer the text is in a button, the more padding there is around that text in the button, thus making the...
0
1827
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 1px on 3 sides. It looks the same in firefox and ie. Then the same box is wrapped in yet another box with a red border on the bottom. In Firefox...
8
2221
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 the div to 110px. ie includes the padding in the 100. is there an easier work-around than reducing the width by 10px if firefox?
4
14519
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
2986
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 get this kind of inconsistent result. -- ----------------------------------------------------------------------------- | Phil Howard KA9WGN ...
14
1695
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 all three simultaneously wrong about this particular quirk), I'm having a hard time figuring out the underlying premise of this behavior. ...
0
7412
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7355
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7594
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7697
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5889
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5285
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4899
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
979
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.