Closed Bug 107122 Opened 24 years ago Closed 22 years ago

<hr> elements do not honor left and right margins in style

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Serge.Torres, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(4 files)

One way to make a centered ruled with a proportional width is to set the left and right margins in a style attribute. Ex. (in XHTML) : <hr style="margin-left=40%;margin-right=40%" /> for a 20% with rule. Mozilla 0.9.5, Redhat 7 rpm build, fails to honor the style whether the margins are proportional or absolute. In the proportional case, the rule is offset to the right as much as 200% of the screen width. The rule itself is about a 100% wide. You have to scroll by a large amount to see it. In the absolute case, Mozilla correctly takes into account the left margin but fails to honor the right margin. The rule seems to have a 100% width so you have to scroll to the right by the width of the left margin to see its end. This behaviour shows up in xhtml and html (loose DTD). I did not test other documents type. The margins show up as expected under Netscape 4.78, Amaya 5.1, Internet Explorer 5 (Windows 2K). Netscpae 6.1 (Windows 2K) exhibit the same behaviour as Mozilla. Cheers, Serge Torres Ecole normale superieure
There's another bug out there somewhere on this. <hr> is a horrible hack in quirks mode, trying to get consistent behavior out of it is nearly impossible.
Whiteboard: DUPEME
Attached file Strict testcase
WFM in strict and quirks modes on today's Linux CVS. Reporter, do you have a testcase for this?
Removing the DOCTYPE makes this one work...
Confirming issue in the Nov 9th build.
Status: UNCONFIRMED → NEW
Ever confirmed: true
The problem occur in standards mode only: See trans_url_doctype_hr.html
Target Milestone: --- → mozilla1.2
*** Bug 143901 has been marked as a duplicate of this bug. ***
having poked around the testcase in the DOM inspector, and played with it a bit, it looks like the <hr> is having its width computed at [whatever], THEN the margin is applied, but the margin makes it wider than the containing box, so the containing box is made wider to fit it in. I'm not a layout guru in _any_ nearby universe, but that doesn't sound right.
Please take a look at bug 155523. It seems that sometime between 11 and 28 June 2002 something happened which causes horizontal rules / lines of, say 100 pixels, to be rendered in the middle / center / centre (searchbait) of the page. Here is a distracting test case, where the small horizontal lines should all be on the left: http://www.firstpr.com.au/show-and-tell/corsetry-1/ This does not involve CSS at all. - Robin Whittle
*** Bug 158701 has been marked as a duplicate of this bug. ***
Assignee: attinasi → other
Keywords: testcase
Target Milestone: mozilla1.2alpha → ---
Depends on: 38370
Fixed by bug 38370.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: