Closed Bug 249774 Opened 20 years ago Closed 20 years ago

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

Categories

(Core :: Layout: Floats, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 52916

People

(Reporter: spam_from_bugzilla, Unassigned)

Details

Attachments

(1 file)

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:
Attached file 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
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: