Will Merrell wrote:
Here's the problem: on Firefox the clearer div occupies no vertical space.
No suprise there. But, under IE6, guess what, the clearer div occupies a
full line.
Will,
Others have give you some fixes for this. If you're still curious, you
can check out this test page I
Hi Folks,
I'm floating some elements on a page, so I am adding a div after to clear
them so they stay in the container. The clearer div looks like this:
div class=clearnbsp;/div
and the css for it looks like this:
.clear {
display : block;
clear: both;
height: 0em;
margin :
From: Will Merrell
div class=clearnbsp;/div
.clear {
display : block;
clear: both;
height: 0em;
margin : 0em;
padding: 0em;
}
...under IE6, guess what, the clearer div occupies a full line.
Remove the non-breaking space form the markup,
and/or set the
Sorry, I screwed up the CSS in the previous sample,
My test case works in IE6 and FF1.0.4
.clear {
line-height: 0;
clear: both;
margin : 0;
padding: 0;
border: 0;
}
.redbox {
float: right;
width: 200px;
margin: 0;
border: 1px solid red;
My test case works in IE6 and FF1.0.4
.clear {
line-height: 0;
clear: both;
margin : 0;
padding: 0;
border: 0;
}
.redbox {
margin: 0;
border: 1px solid red;
color: white;
background: red;
}
.greenbox {
float:
Right you are, Kelly, a line-height of 0 did indeed fix it.
Thank you.
-- Will
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Kelly Miller
Sent: Wednesday, June 29, 2005 10:54 PM
To: Will Merrell
Cc: css-discuss
Subject: Re: [css-d] Setting height
From: Will Merrell [EMAIL PROTECTED]
To: Kelly Miller [EMAIL PROTECTED]
Cc: css-discuss css-d@lists.css-discuss.org
Sent: Wednesday, June 29, 2005 11:29 PM
Subject: RE: [css-d] Setting height to 0 does not work on IE6
Right you are, Kelly, a line-height of 0 did indeed fix it.
Thank you.