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)
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
|   | ||
| Comment 1•23 years ago
           | ||
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
|   | ||
| Comment 2•23 years ago
           | ||
|   | ||
| Comment 3•23 years ago
           | ||
WFM in strict and quirks modes on today's Linux CVS. Reporter, do you have a
testcase for this?
|   | ||
| Comment 4•23 years ago
           | ||
Removing the DOCTYPE makes this one work...
| Comment 5•23 years ago
           | ||
Confirming issue in the Nov 9th build.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Comment 6•23 years ago
           | ||
The problem occur in standards mode only:
See trans_url_doctype_hr.html
| Comment 7•23 years ago
           | ||
|   | ||
| Updated•23 years ago
           | 
Target Milestone: --- → mozilla1.2
|   | ||
| Comment 8•23 years ago
           | ||
*** Bug 143901 has been marked as a duplicate of this bug. ***
|   | ||
| Comment 9•23 years ago
           | ||
|   | ||
| Comment 10•23 years ago
           | ||
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.
| Comment 11•23 years ago
           | ||
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
|   | ||
| Comment 12•23 years ago
           | ||
*** Bug 158701 has been marked as a duplicate of this bug. ***
| Comment 13•22 years ago
           | ||
|   | ||
| Comment 14•22 years ago
           | ||
Fixed by bug 38370.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•