The default bug view has changed. See this FAQ.

Zero-border horizontal rule is laid out incorrectly when there are floated block around it

RESOLVED DUPLICATE of bug 244932

Status

()

Core
Layout: Floats
RESOLVED DUPLICATE of bug 244932
13 years ago
10 years ago

People

(Reporter: Ng Ming Hong, Unassigned)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+

The zero-border horizontal rule gains some extra left margin when there is
floated elements nearby. See the test case attached.

It was displayed properly in Firefox 0.8 (not tested in Mozilla 0.6 through) but
not Firefox 0.9 RC and Mozilla 1.8a.

Reproducible: Always
Steps to Reproduce:
1. Create a HTML document with a horizontal rule (<hr>) with CSS of border:0 and
height:.08em
2. Add one or two floating elements (e.g. image) next to that horizontal rule.
3. Open the HTML in Firefox 0.9 RC or Mozilla 1.8a. See how other elements are
laid properly while the horizontal rule gains extra left margin.

Actual Results:  
The horizontal gains extra left margin. The more the float elements, the more
the left margin.

Expected Results:  
It should not add any left margin, just laid it out as other elements (e.g.
paragraph).
(Reporter)

Comment 1

13 years ago
Created attachment 150417 [details]
HTML Test Case
(Reporter)

Comment 2

13 years ago
Created attachment 150418 [details]
Correct rendering in Firefox 0.8
(Reporter)

Comment 3

13 years ago
Created attachment 150419 [details]
Incorrect rendering in Firefox 0.9 RC
This looks a lot like bug 244932 (which itself could be a duplicate also)
(Reporter)

Comment 5

13 years ago
Martijn, you are right. It looks so similar...
The horizontal rules just go crazy when they see floats...

P.S. This is my site which is facing this problem:
http://minghong.dyndns.org:8080/OpenWiki/
(Reporter)

Updated

13 years ago
Depends on: 244932

Comment 6

13 years ago
Confirming on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3)
Gecko/20040925 Firefox/0.10
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 7

13 years ago
this regressed between linux trunk builds 2004011708 and 2004011808, apparently
bug 52916
Keywords: regression, testcase
OS: Windows 2000 → All
(Reporter)

Comment 8

12 years ago
Still reproducible in Mozilla 1.8a6.
And FYI, IE 6.0 and Opera 8.0 render pretty consistently. For IE, the horizontal
rule always stay away from the floating element; while for Opera, the horizontal
rule always go through the floating element. I'm not sure which one is the
correct rendering though.
(Reporter)

Updated

12 years ago

Comment 9

12 years ago
*** Bug 305450 has been marked as a duplicate of this bug. ***

Comment 10

11 years ago
Testcase WFM using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060817 Minefield/3.0a1 ID:2006081709 [cairo]

Two of the horizontal rules are no longer visible (on my screen), but the ones that are visible no longer intersect the floated blocks.
I made a local copy of the HTML Test Case and increased the height of the horizontal rules.  The layout looks correct.

Comment 11

11 years ago
They all show up with non-cairo trunk build 2006-08-17-12 and are all still out of place.  With a cairo build, the bottom one is missing but the remaining ones are out of place.

Comment 12

10 years ago
Testcase wfm.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070103 Minefield/3.0a2pre
Works in 2006-12-08-01 but not in 2006-12-07-01.  Fixed by reflow branch landing.

The disappearing thing is due to rounding and a height less than 1px being set on the rule (depending on font-size, of course).  I see it with a non-cairo GTK2 build as well.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Depends on: 300030
Resolution: --- → FIXED

Comment 14

10 years ago
(In reply to comment #13)
 
> The disappearing thing is due to rounding and a height less than 1px being set

This id fixed as well in
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070103 Minefield/3.0a2pre
Dupe of 244932?
Yes, yes it is.
No longer depends on: 244932, 300030
Keywords: regression, testcase
Resolution: FIXED → DUPLICATE
Duplicate of bug: 244932
You need to log in before you can comment on or make changes to this bug.