----- Original Message ----- 
  From: Manfred Staudinger 
  To: css-d 
  Cc: Alan K Baker 
  Sent: Saturday, April 05, 2008 7:33 PM
  Subject: Re: <hr /> styling


  Alan, you did _not_ respond to the list and therefore I'll repeat your
  message here:


  Please note that color does not have any meaning if the element has no
  content. This only leaves border-color and background-color to specify
  any color for styling.

  > I didn't measure "enormous" but an estimate is over 20px, which is far more
  > than a simple margin error.

  Sometimes you claim it to be a padding (right) and sometimes a margin
  (false, as no color specification is applicable to the margin).

  I'm sorry, yes the code you posted is very simple, but it does not
  show any bug in Firefox 2.0.0.13. The only problem is, you forgot to
  show us the rule from your stylesheet, which causes the padding ("is
  over 20px") on the <hr />. As a guess, that rule might just look like
  this:
                  html * {padding: 12px 0 12px 0;}

  Manfred

  You're right, my reply went direct to you by mistake. On another topic, I 
rest my case!! <g>

  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.

  Not sure why you say that I am making false claims. If I appear to be 
claiming something to be a padding and sometimes a margin, that is not my 
intention. I am well aware that 'margin' has no color property, why would it? 
It's a non-printable spacing property. The extra spacing that Firefox inserts 
is totally transparent, therefore I can't tell whether it's a margin or padding 
in the true sense of the words. It's a 'lump' of transparency that's being 
inserted, and it's only Firefox that does it. I call that a bug.

  I did not forget to show the rule from my stylesheet that causes padding. 
Firstly, if that was the case, it would happen in all browsers and secondly 
there is no such rule in my stylesheet. I did not show the code for 'body' 
because it is irrelevant in this case. There's nothing in it to cause errant 
spacing and there is no "html * etc" code in my stylesheet.

  FWIW I have included below, all that is above the 'hr' definition and there's 
nothing after it to affect it. The code can be tested exactly as it is below, 
by saving it as a set of styles in an HTML document and a simple <hr /> command 
inserted in the body below it. In Firefox only, it will space itself far more 
than a single line height from the top of the page.

  OK. Set up your own <head></head> and try this in Firefox exactly as it is, 

  <body>
  <style>
  body {
  background-color:#f4f9a8;
  font-family:"Times New Roman", Times, serif;
  font-size:12px;
  font-weight:normal;
  color:black;
  margin:0;
  padding:0;
  }

  hr {
  background-color:#dd0000;
  color:#dd0000;
  }

  #container {
  width:800px;
  height:auto;
  margin:0;
  padding:0;
  position:absolute;
  top:0;
  left:20px;
  }
  </style>
  <div id="container">
  <hr />
  </div>
  </body>

  You'll notice that there are two color definitions for 'hr'. That's because 
Firefox requires background-color to be set, and IE6/7 requires color to be 
set. They are mutually exclusive and cause no problems.

  In fact I believe that Mozilla are wrong. A <hr> is a printable line and is 
therefore a foreground element and should possess color. By definition, how can 
a background be placed on a background, or are they saying that <hr> possesses 
its own z-index?

  Regards, 
   
  Alan.
   
  www.theatreorgans.co.uk
  www.virtualtheatreorgans.com
  Admin: ConnArtistes, UKShopsmiths, 2nd Touch & A-P groups
  Shopsmith 520 + bits
  Flatulus Antiquitus
______________________________________________________________________
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/

Reply via email to