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

Re: Horizontal rules

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Tue, 29 Feb 2000 11:28:15 -0800 (PST)
Message-ID: <20000229192815.29852.qmail@web901.mail.yahoo.com>
To: www-style@w3.org
Here's HTML's HR implementation (as implemented by Win IE  and Opera)
completely described in CSS3:

HR {border: 1px solid;
border-color: windowborder /* ? */; 
display: block;
margin: 6px auto}

HR[color] {border-color: attr(color)}

HR[align=left] {margin-left: 0 !important /* In a UA style sheet? (used
because the author might set margins, which would override this
declaration. I believe a UA !important is essential if there is a real
desire to map HTML attributes to CSS, and I suggest that it raise the UA
declaration to an author one; i.e., this declaration is equivalent to
setting margin-left: 0 in an author style sheet, so specificity works
properly */}

HR[align=right] {margin-right: 0 !important}

HR[size] {height: attr(size)-1} /* Sad that even box-sizing doesn't work
for this (since the default, size=1 has a box height of 2 pixels (top and
bottom borders of 1pixel) */

HR[noshade] {background: windowborder}

HR[noshade][color] {background: attr(color)}

=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
Received on Tuesday, 29 February 2000 14:28:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:04 GMT