float drop when min-width and width proportions are different

RESOLVED INVALID

Status

()

--
minor
RESOLVED INVALID
9 years ago
9 years ago

People

(Reporter: eis271828, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)

Say two floating elements are specified with widths of 25% and 75%.  If the min-width proportions are different - say 100px and 200px, one of the elements will drop below after resizing the window smaller than the containing element's min-width (300px in this case).

Reproducible: Always

Steps to Reproduce:
1.Create a page with appropriately sized div elements (see attachment).
2.Resize window until the horizontal dimension is small enough.
3.Observe the float drop.
Actual Results:  
The right-most floating div dropped below the left floating div.

Expected Results:  
The two inner divs should stay on the same horizontal line.  The minimum width should not be required to be of the same ratio as the ideal width.
(Reporter)

Comment 1

9 years ago
Created attachment 433509 [details]
reproduction - two html examples in one file
hmm, i can not see any different behavior amgonst Fx trunk, 3.6., opera 10.5x, google chrome dev - on winxp.
Hmm, so let's take your second example.
Narrow down the width of the window to say 388px (larger than the min-width of the parent block).
25% (width of red block) = 97px, in that case the min-width takes over (100px)
75% (width of green block) = 291px, or larger than its min-width.
But there is no space to put the green block next to red one (388px-100px=288px available), it drops below the red one. That is the expected behaviour.

As comment 2 notes, WebKit (Safari & Chrome) and Opera (10.0 and 10.5) do the same thing.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 4

9 years ago
OK, I agree that the float should drop with some window widths.  Is it also expected that it won't rise back up once both inner blocks have hit their min-widths?  Given that it's going to drop for at least some window sizes, the importance of this bug (if it is one) is trivial, even though there's no workaround, technically.
> Is it also expected that it won't rise back up once both inner blocks have hit
> their min-widths?

Yes, since at that point they're definitely not fitting next to each other in the container, right?
Resolution: WORKSFORME → INVALID
(Reporter)

Comment 6

9 years ago
> Yes, since at that point they're definitely not fitting next to each other in
> the container, right?

Well, not exactly.  As the window shrinks, the float drops, and then it stops shrinking.  The container is big enough to fit both inner divs at their smallest, but the larger doesn't actually shrink down to its smallest.  On the other hand, I no longer really care about a change to this behavior. =)
You need to log in before you can comment on or make changes to this bug.