Border width in percentages?

There was a discussion a few days ago [1] on c.i.w.a.s about expressing
border widths in percentages (of the parent's width).  None of us had
any idea why this was not allowed by CSS1 [2] and CSS2 [3], like it is
for margin and padding.

It would be very useful for doing things like floats that should occupy
exactly half (or a third, etc.) of the width of the page.  Without
being able to specify percentage width borders, one has to resort to
adding extra markup by enclosing the float in an extra div, as I
described in [4].

David Baron

[1] http://www.dejanews.com/[ST_rn=ps]/thread/%3c36c818b8.171348085@enews.newsguy.com%3e%231/0
[2] http://www.w3.org/TR/REC-CSS1#border-width
[3] http://www.w3.org/TR/REC-CSS2/box.html#propdef-border-width
[4] http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=444387847

-----------------------------------------------------------------
L. David Baron    Freshman, Harvard    dbaron@fas.harvard.edu
Links, SatPix, CSS, etc.  < http://www.fas.harvard.edu/~dbaron/ >
WSP CSS AC                < http://www.webstandards.org/css/ >

Received on Monday, 15 February 1999 13:58:55 UTC