W3C home > Mailing lists > Public > www-style@w3.org > February 2000

Re: Horizontal rules

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Wed, 16 Feb 2000 14:55:00 -0800
Message-ID: <38AB2AC4.6D67@yahoo.com>
To: www-style@w3.org
fantasai wrote:

> Supposing one took your suggestion and used HR {border-top: 2px groove}
> What would happen with <HR size=10>?
> General rendering practice is to create a 1px inset border, 10 pixels
> high, is it not? Your proposal would create a 10px groove.

I'm neutral as to the exact means that should be used - HR {border: 1px
solid gray} is probably best, with height setting the height, so HR
{height: 10px} sets the space between top and bottom borders to 10
pixels, with the HTML formatting attribute color setting border-color
and background-color to the specified value. 

With this approach, which probably closest follows the implementations
to date, the various CSS properties have the following effect

text/font: NONE
text-align: no effect because text-align only affects alignment of
inline content with in line boxes, of which HR has none
height: sets the height of the initially transparent space between
width: sets the width of the element, the width of the HR therefore
being border-left + border-right + width
margin-top and bottom - sets transparent space around HR
margin-left and margin-right - used to specify the width and/or
alignment of HR
padding-left and padding-right - no effect unless width != auto
padding-top and padding-bottom - indistinguishable in effect from height
border properties - sets the width, style and colour of the border
around the HR
background - sets the background of the padding and content area of the
HR - has no effect unless height, padding-top and padding-bottom != 0.
color - no effect unless the UA chooses not to set an initial value for
border-color (i.e., because the initial value for border-color is
color); all UAs do, so in the real world, it has no effect.

I am convinced of the need for a consistent means of specifying HR
characteristics across platforms, and while I am not overly concerned
about the method used, I am interested in ensuring that there is a
standard method of doing so.

Incidentally, Todd Fahrner's base style sheet, at
http://style.metrius.com/corestyle/base.html has:
HR      {
        border: 1px inset; /* questionable */
, to which should be added margin: 6px auto (because HRs are centred
when width is adjusted, and this is the way to achieve this) and border:
1px gray (although I know that IE for one uses UI colours, although I
haven't checked which).
Received on Wednesday, 16 February 2000 09:53:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:53 UTC