Re: CSS: %% length unit. Proposal. Some clarifications.

> Using CSS2 (1998):
>
>    p { display: table; white-space: nowrap; }
>    input { display: table-cell; width: 100%; }
>
> That should work fine. (If you put a <label> around the text labels, you
> can then give it 'display: table-cell' as well which would give you finer
> control over the wrapping.

Ian, it seems you didn't get the idea.
see, here:
"input { display: table-cell; width: 100%; }"
you are saying "I want my input element to have width 100% of its container
width"

Right?   Or I don't understand completely this "formal" definition?
CSS: width/percentage - Specifies a percentage for determining the used
value. The percentage is calculated with respect to the width of the
generated box's containing block.
(Seems like guys in Microsoft are also not getting the idea of this "with
respect to" table-* styles during last 6 years (since 1998 ?))

What I am saying here:
<P>from:<INPUT ... style="width:100%%" /></P>

set width of INPUT equal to 100% of  <container width minus space occupied
by all 'solid' elements in current line>
'solid' elements here means all elements having horizontal dimensions in
units other than %%.
'space occupied' means all width+padding+margin+border having values other
than %%.

Is this formal enough?

In this case INPUT.width will be equal to width of paragraph content minus
width of text "from:"
Left side of INPUT will be attached to "from:" and right side will be
attached to right side of pragraph content box.

Andrew Fedoniouk.
http://terrainformatica.com

Received on Sunday, 9 May 2004 13:27:42 UTC