473,396 Members | 1,734 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,396 software developers and data experts.

An IE6 CSS float bug stumper

Hello, all.

I have searched and searched and searched for details about what I am
experiencing, but I can't find a reference anywhere. I know IE has some
interesting bugs regarding floats - many of which the insane "display:
inline" will fix - but this one us a real stumper.

Visit:

http://www.macorchard.com/junk/bug/

The CSS file is located at:

http://www.macorchard.com/junk/bug/mo.css

....in IE6 - and then in any other modern browser - and you will see that
the left-floated element has space above and below it (margin space,
essentially) that IE insists on displaying. No amount of work - apart from
disabling the left float completely - seems to affect this.

Any help with this would be greatly appreciated. Thanks!

Drew
Nov 8 '05 #1
9 3446
Els
Drew D. Saur wrote:
Hello, all.

I have searched and searched and searched for details about what I am
experiencing, but I can't find a reference anywhere. I know IE has some
interesting bugs regarding floats - many of which the insane "display:
inline" will fix - but this one us a real stumper.

Visit:

http://www.macorchard.com/junk/bug/

The CSS file is located at:

http://www.macorchard.com/junk/bug/mo.css

...in IE6 - and then in any other modern browser - and you will see that
the left-floated element has space above and below it (margin space,
essentially) that IE insists on displaying. No amount of work - apart from
disabling the left float completely - seems to affect this.


The reason is collapsing margins, and adding a border on div.App
solves it.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Nov 8 '05 #2
Els <el*********@tiscali.nl> wrote in
news:dr***************@locusmeus.com:
Drew D. Saur wrote:
Hello, all.

I have searched and searched and searched for details about what I am
experiencing, but I can't find a reference anywhere. I know IE has
some interesting bugs regarding floats - many of which the insane
"display: inline" will fix - but this one us a real stumper.

Visit:

http://www.macorchard.com/junk/bug/

The CSS file is located at:

http://www.macorchard.com/junk/bug/mo.css

...in IE6 - and then in any other modern browser - and you will see
that the left-floated element has space above and below it (margin
space, essentially) that IE insists on displaying. No amount of work
- apart from disabling the left float completely - seems to affect
this.


The reason is collapsing margins, and adding a border on div.App
solves it.


Thanks, Els! - I did as you stated and came up with
http://www.macorchard.com/junk/bug2/ - and while I do have a good grasp
of collapsing margins, I am stumped regarding why *adding* a border helps
in this case. If you have a moment to clarify further, I would appreciate
it. Thanks!

Drew
Nov 8 '05 #3
Els
Drew D. Saur wrote:
Els <el*********@tiscali.nl> wrote in
news:dr***************@locusmeus.com:
Drew D. Saur wrote:
Hello, all.

I have searched and searched and searched for details about what I am
experiencing, but I can't find a reference anywhere. I know IE has
some interesting bugs regarding floats - many of which the insane
"display: inline" will fix - but this one us a real stumper.

Visit:

http://www.macorchard.com/junk/bug/

The CSS file is located at:

http://www.macorchard.com/junk/bug/mo.css

...in IE6 - and then in any other modern browser - and you will see
that the left-floated element has space above and below it (margin
space, essentially) that IE insists on displaying. No amount of work
- apart from disabling the left float completely - seems to affect
this.


The reason is collapsing margins, and adding a border on div.App
solves it.


Thanks, Els! - I did as you stated and came up with
http://www.macorchard.com/junk/bug2/ - and while I do have a good grasp
of collapsing margins, I am stumped regarding why *adding* a border helps
in this case. If you have a moment to clarify further, I would appreciate
it. Thanks!


Thinking again, maybe it wasn't a legitimate collapsing margins issue
- that would have had IE do what you like, instead of the other
browsers.

It reminded me of collapsing margins, because adding a border to
div.App keeps the top margin of div.App from collapsing with the top
margin of body. If you compare your two examples, you can see that the
floated element doesn't change place, but the div.App doesn't extend
to the top of body anymore in the second example.
Borders and paddings stop margins from collapsing into the elements so
to speak.

The weird bit, is the bottom margin of the floated h2, which seems to
be effected by what happens to the top margin for some reason.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Nov 8 '05 #4
Els <el*********@tiscali.nl> wrote in
news:d0**************@locusmeus.com:
Thinking again, maybe it wasn't a legitimate collapsing margins issue
- that would have had IE do what you like, instead of the other
browsers.

It reminded me of collapsing margins, because adding a border to
div.App keeps the top margin of div.App from collapsing with the top
margin of body. If you compare your two examples, you can see that the
floated element doesn't change place, but the div.App doesn't extend
to the top of body anymore in the second example.
Borders and paddings stop margins from collapsing into the elements so
to speak.

The weird bit, is the bottom margin of the floated h2, which seems to
be effected by what happens to the top margin for some reason.


Yes, and that was really what "stumped" me to begin with! Frankly, in the
design that I had, the top margin wasn't causing a problem for me (the
samples were snipped from a larger context) - it was the space below, which
your border trick did indeed solve, but as I think you will agree, it is at
odds with the typical collapsing margin bugs.

It can't be that I have stumbled across an otherwise unknown IE bug, can
it? That seems impossible....

Does anybody else know what's going on here?

Drew
Nov 8 '05 #5
In article <Xn**********************************@24.24.2.167> ,
"Drew D. Saur" <ds***@fusionproductions.com> wrote:
Els <el*********@tiscali.nl> wrote in
news:d0**************@locusmeus.com:
Thinking again, maybe it wasn't a legitimate collapsing margins issue
- that would have had IE do what you like, instead of the other
browsers.

It reminded me of collapsing margins, because adding a border to
div.App keeps the top margin of div.App from collapsing with the top
margin of body. If you compare your two examples, you can see that the
floated element doesn't change place, but the div.App doesn't extend
to the top of body anymore in the second example.
Borders and paddings stop margins from collapsing into the elements so
to speak.

The weird bit, is the bottom margin of the floated h2, which seems to
be effected by what happens to the top margin for some reason.


Yes, and that was really what "stumped" me to begin with! Frankly, in the
design that I had, the top margin wasn't causing a problem for me (the
samples were snipped from a larger context) - it was the space below, which
your border trick did indeed solve, but as I think you will agree, it is at
odds with the typical collapsing margin bugs.

It can't be that I have stumbled across an otherwise unknown IE bug, can
it? That seems impossible....

Does anybody else know what's going on here?

Drew


Any takers here?

Did I really find a new major bug in IE6? I find that hard to believe,
but if I did, I would like to report it....

Drew

--
The Mac Orchard - http://www.macorchard.com/
Essential Internet Applications since 1995
Nov 10 '05 #6
On Thu, 10 Nov 2005 18:57:38 GMT, "Drew D. Saur" <ds***@macorchard.com>
wrote:
In article <Xn**********************************@24.24.2.167> ,
"Drew D. Saur" <ds***@fusionproductions.com> wrote:
Els <el*********@tiscali.nl> wrote in
news:d0**************@locusmeus.com:
> Thinking again, maybe it wasn't a legitimate collapsing margins issue
> - that would have had IE do what you like, instead of the other
> browsers.


Yes, and that was really what "stumped" me to begin with! Frankly, in the
design that I had, the top margin wasn't causing a problem for me (the
samples were snipped from a larger context) - it was the space below, which
your border trick did indeed solve, but as I think you will agree, it is at
odds with the typical collapsing margin bugs.

It can't be that I have stumbled across an otherwise unknown IE bug, can
it? That seems impossible....

Does anybody else know what's going on here?


Any takers here?

Did I really find a new major bug in IE6? I find that hard to believe,
but if I did, I would like to report it....


Please don't get excited. If you can find a major area of IE that has
*no* bugs it will be time to get excited ...

Seriously: I haven't followed this in detail, but I had an incident with
IE a year ago when I had excessive spacing between elements. After
fighting it for a few hours I gave up - it didn't look too awful. While
tracking down another problem later I temporarily added a coloured
border to another unrelated element - and the spacing problem went away!
I was using a plain background, so I changed the border to the
background colour and left it there as a kluge. Whether this is related
to your problem here I'm not sure, but it could well be.

Really it's only worth documenting a bug if you can give a good analysis
of when it occurs (rather than a single example). Have you got that far?

And as for reporting it to Microsoft: save your breath. They don't give
a damn. (How long has peekaboo been around? Or 3px jog? Non-functioning
max-width? Non-functioning child selectors? A few hundred other things?)

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Nov 10 '05 #7
>And as for reporting it to Microsoft: save your breath. They don't give
a damn. (How long has peekaboo been around? Or 3px jog? Non-functioning
max-width? Non-functioning child selectors? A few hundred other things?)


http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx

"In IE7, we will fix as many of the worst bugs that web developers hit
as we can, and we will add the critical most-requested features from
the standards as well. Though you won't see (most of) these until
Beta 2, we have already fixed the following bugs from
PositionIsEverything and Quirksmode:

Peekaboo bug
Guillotine bug
Duplicate Character bug
Border Chaos
No Scroll bug
3 Pixel Text Jog
Magic Creeping Text bug
Bottom Margin bug on Hover
Losing the ability to highlight text under the top border
IE/Win Line-height bug
Double Float Margin Bug
Quirky Percentages in IE
Duplicate indent
Moving viewport scrollbar outside HTML borders
1 px border style
Disappearing List-background
Fix width:auto"

They took their sweet time to do it, but it looks like it's happening -
finally

Nov 10 '05 #8
On 10 Nov 2005 14:09:10 -0800, "Tony" <to****@dslextreme.com> wrote:
And as for reporting it to Microsoft: save your breath. They don't give
a damn. (How long has peekaboo been around? Or 3px jog? Non-functioning
max-width? Non-functioning child selectors? A few hundred other things?)
http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx

"In IE7, we will fix as many of the worst bugs that web developers hit
as we can, and we will add the critical most-requested features from
the standards as well. Though you won't see (most of) these until
Beta 2, we have already fixed the following bugs from
PositionIsEverything and Quirksmode:

Peekaboo bug
Guillotine bug

<snip>
They took their sweet time to do it, but it looks like it's happening -
finally

Thanks for that - that had passed me by.

I'm afraid however that the phrase "the critical most-requested features
from the standards" more or less confirms that they have absolutely no
intention of reforming. Wouldn't the phrase "comply with standards" have
made a nice change?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Nov 11 '05 #9
"Stephen Poley" <sb******************@xs4all.nl> wrote in message
news:uv********************************@4ax.com...
On 10 Nov 2005 14:09:10 -0800, "Tony" <to****@dslextreme.com> wrote:
And as for reporting it to Microsoft: save your breath. They don't give
a damn. (How long has peekaboo been around? Or 3px jog? Non-functioning
max-width? Non-functioning child selectors? A few hundred other things?)


http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx

"In IE7, we will fix as many of the worst bugs that web developers hit
as we can, and we will add the critical most-requested features from
the standards as well. Though you won't see (most of) these until
Beta 2, we have already fixed the following bugs from
PositionIsEverything and Quirksmode:

Peekaboo bug
Guillotine bug

<snip>
They took their sweet time to do it, but it looks like it's happening -
finally

Thanks for that - that had passed me by.

I'm afraid however that the phrase "the critical most-requested features
from the standards" more or less confirms that they have absolutely no
intention of reforming. Wouldn't the phrase "comply with standards" have
made a nice change?


Given where they were, it would likely take quite a bit of recoding to fully
comply with standards. At least this is a step in the right direction - and
from what I read, they do seem to intend to continue in the direction of
standards compliance after this release.
Nov 11 '05 #10

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

Similar topics

5
by: Pat | last post by:
Give two double-typed variable X and Y. If (X==Y) is true, then how about the following results: (float(X) > float(Y))? (float(X) < float(Y))? (float(X) >= float(Y))? ( X > float(Y) )? ( X...
9
by: Drew D. Saur | last post by:
Hello, all. I have searched and searched and searched for details about what I am experiencing, but I can't find a reference anywhere. I know IE has some interesting bugs regarding floats - many...
16
by: Gerald Lafreniere | last post by:
{ float F=123.456000; F*=1000; // Actually I used a for loop F*=10 three times. printf("%f\n", F); } This will produce something like 123456.00XXXX, where XXXX are garbage digits. Why...
9
by: Sisyphus | last post by:
Hi, I have some software that does the following (in an attempt to determine whether the double x, can be represented just as accurately by a float): void test_it(double x) { float y = x;...
11
by: Marc Pelletier | last post by:
Hello, I am having trouble implementing the following callback: CNCSError CECWCompressor::WriteReadLine(UINT32 nNextLine, void **ppInputArray) where ppInputArray is a 3 by x array. The...
20
by: ehabaziz2001 | last post by:
That program does not yield and respond correctly espcially for the pointers (*f),(*i) in print_divide_meter_into(&meter,&yds,&ft,&ins); /*--------------pnt02own.c------------ ---1 inch = 2.51...
8
by: vjnr83 | last post by:
Hi, I have a doubt: what is the difference between float **p and float *p? Thanks in advance, Vijay
13
by: Shirsoft | last post by:
I have a 32 bit intel and 64 bit AMD machine. There is a rounding error in the 8th digit. Unfortunately because of the algorithm we use, the errors percolate into higher digits. C++ code is...
3
by: Arnie | last post by:
Folks, We ran into a pretty significant performance penalty when casting floats. We've identified a code workaround that we wanted to pass along but also was wondering if others had experience...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
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...
0
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...
0
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,...

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.