W3C home > Mailing lists > Public > www-html@w3.org > December 2000

Re: The <HR> tag

From: Jim Correia <correia@barebones.com>
Date: Tue, 26 Dec 2000 12:55:41 -0500
To: www-html@w3.org
Message-ID: <20001226125542-f01010601-bcc9d7f5@>
On 12:41 PM 12/26/00 pdf@bizfon.com wrote:

> Yes, but my point is that IE seems to be the only UA that displays
> the color correctly (with or without styles).  I guess my question
> is, how does one know what a valid style attribute is for the HR tag?

By reading the CSS specification.

>  Obviously, styles that pertain to fonts (font-family, etc.) would
> have no effect on an HR tag, so who is to say that a color style
> would have an effect?

HR is a block element so any style applicable to block elements should
be ok.  Ones that semantically don't make sense shouldn't have any
effect (like font face, etc.).

> And then, should it be color or background-color (I think both of
> these will change the color of an HR in IE)?

Color, obviously.  Background changes the background color of the
element.  An HR probably has no padding in the default representation
(which the CSS spec doesn't specify), but if you give it some you can
see the background:

<hr style="color: green; background: blue; padding: 2em;">

Jim Correia                                Bare Bones Software, Inc.
correia@barebones.com                     <http://web.barebones.com>
Received on Tuesday, 26 December 2000 12:55:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:55 UTC