centered max-width div flows around float that is actually in the margin

RESOLVED DUPLICATE of bug 52916

Status

()

RESOLVED DUPLICATE of bug 52916
15 years ago
15 years ago

People

(Reporter: spam_from_bugzilla, Unassigned)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040227 Firefox/0.8
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040227 Firefox/0.8

I have a div with a max-width and margin-left/right: auto. It is viewed in a
window wide enough that the max-width applies and margins are added left and
right.  Another div is floated to the left and fits entirely in the margin.  But
the first div gets indented as if flowing around the div.  I.E. I expect this:

fffff     mmmmmmmmmmmmmmmmm
ffffff    mmmmmmmmmmmmmmmmm
          mmmmmmmmmmmmmmmmm
          mmmmmmmmmmmmmmmmm

But I get this:

fffff          mmmmmmmmmmmm
fffff          mmmmmmmmmmmm
          mmmmmmmmmmmmmmmmm
          mmmmmmmmmmmmmmmmm

It works correctly if the max-width is replaced with a normal width.

I will attach a complete example, but here is the relevant bit of the CSS:

.float {
  float: left;
  width: 200px;
}
#max-width {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}


Humble appologies if this is a dupe or already fixed.  THIS IS ON FIREFOX 0.8,
SORRY.  I have read all the bugs with max-width in the summary...

Regards, --Phil.


Reproducible: Always
Steps to Reproduce:
(Reporter)

Comment 1

15 years ago
Created attachment 152291 [details]
Testcase
I can see the bug using Mozilla1.6, but I can't see the bug anymore using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/2004-07-01
Firefox/0.8.0+
So I think this bug has been fixed already.

*** This bug has been marked as a duplicate of 52916 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.