473,547 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3449
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*********@ti scali.nl> wrote in
news:dr******** *******@locusme us.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*********@ti scali.nl> wrote in
news:dr******** *******@locusme us.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*********@ti scali.nl> wrote in
news:d0******** ******@locusmeu s.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***@fusionpr oductions.com> wrote:
Els <el*********@ti scali.nl> wrote in
news:d0******** ******@locusmeu s.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***@macorcha rd.com>
wrote:
In article <Xn************ *************** *******@24.24.2 .167>,
"Drew D. Saur" <ds***@fusionpr oductions.com> wrote:
Els <el*********@ti scali.nl> wrote in
news:d0******** ******@locusmeu s.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
PositionIsEvery thing 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****@dslextr eme.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
PositionIsEver ything 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.n l> wrote in message
news:uv******** *************** *********@4ax.c om...
On 10 Nov 2005 14:09:10 -0800, "Tony" <to****@dslextr eme.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
PositionIsEve rything 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
1865
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 < float(Y) )?
9
699
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 of which the insane "display: inline" will fix - but this one us a real stumper. Visit: http://www.macorchard.com/junk/bug/
16
2540
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 is this happening, and how do I get rid of it? (using Dev-C++
9
2392
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; if(x == y) { printf("x can be represented precisely by a float\n"); }
11
2252
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 length of x is not known at compile time.
20
3122
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 cm ---1 inch = 2.54/100 Meter ---1 yard = 3 feet ---1 feet = 12 inch
8
6001
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
6163
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 ------------------ b += (float)(mode *val); On 32 bit(intel , vs 2003, C++), some watch variables are
3
10649
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 with this and if there is a better solution. -jeff
0
7510
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, well explore What is ONU, What Is Router, ONU & Routers main...
0
7437
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
7703
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. ...
0
7797
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...
1
5362
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
3493
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1923
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1050
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
748
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.