User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 The following HR element renders as a vertical line, as expected: <hr width="1" size="50"> The following HR element, with color defined, renders as a gray circle instead: <hr width="1" size="50" color="#C0C0C0"> Reproducible: Always Steps to Reproduce: Insert two HR tags into a page: <hr width="1" size="50"> <hr width="1" size="50" color="#C0C0C0"> Actual Results: The HR element with color defined is displayed as a circle, the other as a vertical line as the rather creative web author intended.
Assignee: firefox → nobody
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → Trunk
Using a standard DOCTYPE, I get this error with your HTML fragment File "tit002:Users:bfowler:Documents:eWitness:BC:untitled text 2.html"; Line 11: Document type doesn't permit attribute “color” within element “<hr>”. These two <hr> elements both render as you describe <hr width="1" size="50"> <hr width="50" size="50" color="#C0C0C0"> It is as though the attempt to set the color sets the width to the same as the height.
Ben, it really doesn't matter that much, in the end, whether the document validates. Almost not HTML document does; we still need to render them. As for this bug, <hr> has a rounded border, with border-radius equal to the size. This gives good visual results when an <hr> is actually used as a horizontal rule. If you have a strong urge to abuse <hr>, just set -moz-border-radius to 0 on it. We have existing (probably invalid) bugs on the interaction of border-radius with this misuse of <hr>, but I can't seem to find them....
Bug 232273 <hr> tag displays a circle instead of a line Bug 226037 horizontal rule with both size and noshade attributes displays as a circle Bug 274155 Horizontal rule noshade renders incorrectly is duped to 226037, but has a fine i.e. minimal testcase attached duping to/according bug 226037 comment 1 from Boris Zbarsky *** This bug has been marked as a duplicate of 226037 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.