HR with height of 1px is displayed as 2px

RESOLVED INVALID

Status

()

Firefox
General
RESOLVED INVALID
10 years ago
10 years ago

People

(Reporter: Aarjan, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0

A <hr> tag with a style "height: 1px" is displayed the same as with "height: 2px". In other words, it is displayed to big. In the previous version (FF2) it was displayed correctly. Is doesn't matter if the style is given within the <hr> tag or via a CSS.

Reproducible: Always

Steps to Reproduce:
Create a html file like this:
<html>
<body>
<hr style="height: 1px">
</body>
</html>
Actual Results:  
The horizontal rule is displayed as it would be when the style was set to "height: 2px"

Expected Results:  
The horizontal rule should be displayed as a one pixel high line

In Firefox 2 this was rendered correctly

Comment 1

10 years ago
The height of a HR includes the top AND bottom border - both of which are 1px - so to get a rule of 1px you will need to set one of them to 0.

data:text/html,<html><body><hr style="height: 1px"><hr style="height: 1px;border-top:0"></body></html>
(Reporter)

Comment 2

10 years ago
Does this mean that height specifies the total height of the ruler with a minimum of the sum of the sizes of both the top and bottom border?

Comment 3

10 years ago
Hmm.
In principle, there is no difference between Fx2 and Fx3, but the darkness changed slightly.

In the unstyled case (black on white), you get a dark gray over a light gray line.

The lightgray line is abit darker now and more visible on white background.

This is global change, IIRC to cleanup and correct table-border layout code in quirks mode.

INVALID or WONTFIX, I'd say 
(Reporter)

Comment 4

10 years ago
As soon as you change the style to style="color: #00FF00; height:1px" the difference between FX2 and FX3 become clear. But when looking closer it might have been a problem of FX2 instead of FX3. In FX2 the change doesn't have any effect, but in FX3 it does change the color.

Since the background color we used is close to one of the old default colors of the borders this might not have been noticed before.

Sorry for the inconvenience. 

Comment 5

10 years ago
> INVALID
Status: UNCONFIRMED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.