Hi Manfred. With thanks to you, Georg, Michael and Philippe.
To clear up a few possible misunderstandings: Yes, I should have taken time to read the 'standard'. I have no issue with the concepts of Margin and padding. Sorry if I gave the wrong impression. I also have no problem with the concept of <hr> being a block element. The problems with the varying 'margin' were due to faulty testing, due to 'browser fighting' by me to try to place some 90px text exactly where I wanted it, with a <hr> beneath, and finding that different browsers gave me vastly varying margins. Just try the following in several browsers: <body><style>h1 {font-family:"Times New Roman", Times, serif;font-size:90px;font-weight:normal;color:#d00;}</style><h1>Some stuff</h1></body> and view the differences in transparent space, above and below the letters. (I'm deliberately avoiding calling it margin or padding, to avoid semantic confusion). Depending on the browser, there are different methods needed to address the actual color of horizontal line in <hr>. My test results are below: hr { background-color:#d00; /* Firefox */ Implies that the 'line' is entirely constructed of padding and transparent space is 'margin'. color:#d00; /* IE 6 & 7 */ Implies that the line is classed as text, the element cannot have padding because background-color does nothing, and its transparent space is 'margin' . border-color:#d00; /* Opera & Safari */ Implies that the line is classed as a border, the element cannot have padding because background-color does nothing, and its transparent space is 'margin' . margin:0; padding:0; } If one of these methods is the de-facto standard, then <hr> must be classed as a special case, where some rules of block styling do not apply, or at least one of the browsers is breaking the rules. All of this as part of friendly discussion and IMO, of course. Regards, Alan. www.theatreorgans.co.uk www.virtualtheatreorgans.com Admin: ConnArtistes, UKShopsmiths, 2nd Touch & A-P groups Shopsmith 520 + bits Flatulus Antiquitus ----- Original Message ----- From: Manfred Staudinger To: Alan K Baker Cc: css-d Sent: Sunday, April 06, 2008 2:56 AM Subject: Re: [css-d] <hr /> styling Hi Alan, > Without me looking up specifications, if color has no meaning, then how do you propose > to change the color of a horizontal rule? It is not a border, neither is it a background, so > how else would you style its color property? To answer my own question, Mozilla > obviously think it's a background element, but then you can't simply put printable > characters on top of it, so they are breaking the rules. If you take a look at the HTML 4.01 Strict DTD http://www.w3.org/TR/html401/sgml/dtd.html you will see that HR is a block-element (maybe you meant this when you say "background element")! This answers also your question but in a different way: looking up the specification is always helpful to learn what the rules are. I didn't say you are "making false claims" but you use some basic notion very freely. When it comes to differentiate between margin and padding this should be simple: for example the padding takes the background-color but the margin not. So if you have a block-level element and you have specified a background-color then the transparent space is the elements margin area, isn't it? The code you posted .... looks almost the same in Firefox and IE 6. Was this your intention? Above I showed you that <hr> is defined as a block-level element in the HTML 4.01 Strict DTD. As long as you don't backup the "foreground element" with some evidence, I have to assume it's only your personal opinion. Manfred ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/