bug in IE7: a float:right does not float (under certain abs. positioning conditions)

Skip to first unread message

Michael Hasenstein

Oct 12, 2007, 6:02:51 PM10/12/07
Demo page:

There are two DIVs on the demo page. The first one is as shown below,
the second one has "position:relative" instead of "absolute". The blue
area is a float:right DIV.

See what I mean? The float doesn't float! Works fine in Firefox (of course).

<div style="position:absolute; white-space:nowrap; font-weight:bold;">
<div style="position: absolute; top: 0; left: 0; border: 1px dotted
<div style="font-size: 500%;">Unterschied!</div>
<div style="float: right; background-color: #00f; width:

Any way to correct this? I need it for this page:
(that page I link to may within very few days from posting this have
changed completely, so if you don't see the text moving into view over
the picture with a link/button - which is that &%%$$§!" float of the
above example - just stick to the above example...)

And NO, I MUST use abs. pos. The above example of course doesn't need
it, since I cut it down to the absolutely essential tags (plus some like
borders, colors for easier viewing). I'm moving (YUI animate method) a
container DIV with abs. positioned items inside, and wanted to place a
(YUI link-)button on the right edge - that's how I found that IE7 bug.
Ohh how I *hate* this stupid browser! Even IE7, it's one one bit better
than the previous releases!

Michael Hasenstein

Oct 13, 2007, 3:10:43 AM10/13/07
Solved by using abs. positioning with bottom: and right: on that float
instead of float:, but it's still (yet) another stupid IE7 bug.

I wrote:
> Demo page:
> http://hasenstein.com/TMP/ie7bug-demo.html

Reply all
Reply to author
0 new messages