[Prev][Next][Index][Thread]

[Q] Shouldn't margin-bottom...?



Dan Delaney writes:

 >    Shouldn't this Style Sheet make it so that Paragraphs do NOT have space
 > between them and have the first line indented?
 > 
 > P {text-indent:15; margin-bottom:0}

First, you need a unit on the "15" value. I assume you meant pixels,
but this must be specified:

  P { text-indent: 15px; margin-bottom: 0 }

"0" values may have, but do not need, units.

Also, remember that the vertical margin between two block-level
elements (i.e. paragraohs) depend on two properties: 'margin-bottom'
of the upper paragraph and 'margin-top' of the lower paragraph. The
resulting margin is the maximum of the two values. So, to ensure zero
margins, both properties should be set:

  P { 
    text-indent: 15px;
    margin-top: 0;
    margin-bottom: 0;
  }


 >   Is that not correct or does MSIE just not implement CSS
 >   correctly?

MSIE 3 was released before CSS1 was finalized. This was great -- we
all learnt a lot -- but it necessarily makes MSIE3 a non-conforming
browser. Check the page that documents CSS1 support in MSIE3 [1].

[1] http://www.shadow.net/~braden/nostyle/index.html

Regards,

-h&kon

H      k   o   n      W   i   u   m       L   i   e
howcome@w3.org   W o r l d   Wide  W e b  Consortium
inria # FRANCE http://www.w3.org/people/howcome


References: