As stated in CSS 2,
Box model/Width:
"The percentage is calculated with respect to the width of the generated
box's containing block."
This makes percentable values completely useless.
If we will change this definition to:
"The percentage is calculated with respect to the width of the generated
box's containing block *minus widths of all fixed elements in the line*".
Illustration:
Lets say we have three blocks placed inline with widths 25%, 100px and 75%:
|<---25%--->|<---fixed:100px--->|<----------75%--------->|
Actual first and third block widths will be calculated from
ContainerContentWidth-100px weighted by their percentable values.
Using proposed alghorithm it is possible to mix fixed and "spring" content
without any tables.
Same approach should apply to heights.
Another illustration:
<P>Here is first input element <INPUT width=100px> and <SPAN
class=bigfont>here</SPAN> is another: <INPUT width=100%></P>
If we will use new schema then last input element will occupy the rest of
the line.
Layout like this cannot be implemented even with <table> because of base
line issues.
I've implemented this alghorithm in my experimental rendering engine.
Implementation is pretty simple and do not increase comlexity of layout
alghorithms significantly.
If anybody want to take a look just drop me message.
Andrew Fedoniouk.
http://TerraInformatica.com
PS: Does anybody know where is the best place to publish proposals like
this?