text not justified in width:auto float




16 years ago
16 years ago


(Reporter: 石庭豐 (Seak, Teng-Fong), Assigned: Marc Attinasi)



Windows 2000

Firefox Tracking Flags

(Not tracked)



(1 attachment)



16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc3)
BuildID:    20020523

In the attached test-case, the 2nd block of text isn't placed on the right of
the 1st block.  Instead, it's placed under the 1st block.
Changing <span> to <div> doesn't help.  (At the same time, please notice that
text in it isn't justified.)

If the width of the 2nd block is specified, eg in percentage by removing the CSS
comment markers, the 2nd block is placed properly.  (Notice that this time the
text is justified!)

So, it seems like Mozilla forgot or failed to calculate the width of a block
using "float" relative to the width of the other block using "float" too.

Reproducible: Always

Comment 1

16 years ago
Created attachment 85425 [details]
Test case for CSS "float" property


16 years ago
Keywords: testcase
The width of a float _has_ to be specified -- see http://www.w3.org/TR/REC-
CSS2/visuren.html#floats, second paragraph.

If there is no width, the float should take as much horizontal space as needed 
for the content (in this case, the second float ends up being the width of the 
page and thus does not fit next to the second float).

IE's handling of this is known to be buggy, but that's ok since the original 
document is not following the CSS spec to start with.
Last Resolved: 16 years ago
Resolution: --- → INVALID
er, "does not fit next to the /first/ float".  Putting borders on the floats 
should make this very clear. (and reading your initial comment again, the width 
of a floated block should not be affected by other floated blocks).

Comment 4

16 years ago
Closed already?  Not so quick :)
Even if it's true that "width" wasn't specified and my test-case wasn't valid
(I'm not convinced), there's still another bug: text isn't justified.  So this
bug isn't resolved.
Back to the width attribute. OK, it's not specified, but even if I put
width:auto, it doesn't help.  If specifying percentage makes this page work, I
don't see why I couldn't specify absolute length.  But in absolute length, how
can an author know the total length of the window so that he could specify width
for every float?

Something's really wrong here. Even while reading O'Reilly's CSS pocket
reference written by Eric A. Meyer, W3C member and esp. author of CSS, I don't
have the feeling that this page should behave as it's now inside Mozilla.

And even suppose that I'm still wrong with all my "speculations", I would at
least expect an answer / an explaination as how to use CSS so that I could have
two floats side by side and in absolut width.
Resolution: INVALID → ---
resummarising to reflect the justification issue.

> OK, it's not specified, but even if I put width:auto

Then it's still not specified.  See the link to the spec.

> I would at least expect an answer / an explaination as how to use CSS 

The correct forum for that is a CSS newsgroup ot mailing list, not a bug 
report.  I recommend netscape.public.mozilla.style if you can find nothing else 
that will serve...

That said, percentage sizing is what you want here.
Summary: CSS "float" property isn't working properly → text not justified in width:auto float

Comment 6

16 years ago
Based on comments below, marking invalid.
Last Resolved: 16 years ago16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.