Open
Bug 125560
Opened 23 years ago
Updated 2 years ago
Rounding error positioning float: right inside block with percentage margins
Categories
(Core :: Layout: Floats, defect, P3)
Core
Layout: Floats
Tracking
()
NEW
Future
People
(Reporter: Daniel.Steinberger, Unassigned)
References
()
Details
(Keywords: css1, Whiteboard: [CSS1-5.5.5][CSS1-5.5.25])
Attachments
(2 files, 1 obsolete file)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.8+)
Gecko/20020212
BuildID: 2002021203
due to rounding errors, Mozilla (and thus Netscape 6.x) may not move a
right-floated element over as far as it should be - this way the overlapping
margins display wrong.
Reproducible: Always
Steps to Reproduce:
1. visit URL or open testcase
(2. if you're at the URL, go down to the punchbox "better stick to what's needed")
3. resize your window a little, until you can see a border at the right of the
punchbox
Actual Results: sometimes (rounding?) there is a border
Expected Results: border should never appear
Opera6 does it perfectly right (at least my testcase)
IE6 does.. strange things. it doesn't change the display, but it doesn't display
it perfectly either
Mozilla does it well, except when your window is at a bad size
Reporter | ||
Comment 1•23 years ago
|
||
this is a simplyfied testcase demonstrating the issue. you may find the same
testcase here: http://frozenfire.dnsalias.net/NEMESiS/testcases/rounding.html -
it's a stipped down example of Eric A. Meyer's punchbox demo. easy to read.
Updated•23 years ago
|
QA Contact: petersen → moied
Confirmed with build ID 20020214 on win2k
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P4
Updated•23 years ago
|
Target Milestone: --- → Future
Comment 3•22 years ago
|
||
.
Assignee: attinasi → float
Component: Layout → Layout: Floats
Priority: P4 → --
QA Contact: moied → ian
Target Milestone: Future → ---
Updated•21 years ago
|
Priority: -- → P3
Target Milestone: --- → Future
Comment 4•21 years ago
|
||
I dont see any odd thing with the testcase, is this WFM? Build 20040114, Windows XP.
Reporter | ||
Comment 5•21 years ago
|
||
it's still there in mozilla-1.6 (id 20040113) - so it probably will be for your
build. did you RESIZE you window pixelwise? the bug only appears sometimes, when
the window-width triggers this rounding error.
Comment 6•21 years ago
|
||
I've attached a somewhat reduced testcase. To see the bug, it is essential that
the containing block of the float: right have a percentage margin. Furthermore,
the analogous testcase with float: left (included) shows no rounding errors at
any window width, regardless of resizing from right or left.
Attachment #69511 -
Attachment is obsolete: true
Updated•21 years ago
|
Keywords: css1
Summary: rounding error (?) with right floating DIVs and negative margins → Rounding error positioning float: right inside block with percentage margins
Whiteboard: [CSS1-5.5.5][CSS1-5.5.25]
Comment 7•21 years ago
|
||
*** Bug 214567 has been marked as a duplicate of this bug. ***
Comment 8•21 years ago
|
||
I'm seeing this on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:)
Gecko/20040309
It's definitely still a bug.
Updated•21 years ago
|
OS: Windows XP → All
Hardware: PC → All
Comment 9•21 years ago
|
||
Confirmed.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040331
Microsoft Windows 2000 Professional 5.00.2195 SP4
Comment 10•20 years ago
|
||
A similar thing happens when a div with a percent-based width contains two other
divs, one floated left, one right, whose widths add up to 100%. It seems to be
the same issue. Testcase follows...
Comment 11•20 years ago
|
||
The divs are coloured for clarity.
This doesn't seem to reproduce using ems in the outer div, nor in both the
outer and inner divs, resizing window, text or both.
Removing the percentage width from the outer div, or assigning a width of 100%
seems to fix the bug.
Any percentage width other than 100% seems to reproduce the bug.
Comment 12•17 years ago
|
||
Hmm, this looks like a rounding error in the computed values; not sure if we care enough to do double-precision math, though.
Updated•15 years ago
|
Assignee: layout.floats → nobody
QA Contact: ian → layout.floats
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•