I am wondering if there is some kind of weight property in HTML or CSS (or at least the work around).
I do not mean font-weight. I mean the size that the element can stretch.
<div id="wrapper">
<div weight="1">
<div weight="2">
</div>
In this example, the first div should occupy 1/3 of the width or height (depending on the display property of the shell and its content orientation), since the sum of the weights of the elements in the wrapper is 3, and the weight of the div is 1. Therefore, the second div should occupy 2 / 3 spaces (weight = 2).
This is a great way to set the width of elements in a wrapper if one width is relative to the others and if their number is dynamic.
Is there something similar, or do I need to use JS for this?
Froxx source
share