Let's say I have 4 div, with the width:25%
property. In a space of 1000px, that 25% would represent 250px.
<div style="width:1000px"></div>
<div style="width:25%;"></div>
<div style="width:25%;"></div>
<div style="width:25%;"></div>
<div style="width:25%;"></div>
</div>
Using only css, you could "capture" the width of the responsive div in pixels and apply that captured value to the height
property.
It would be something like:
<div style="width:1000px"></div>
<div style="width:25%; height: 250px"></div>
<div style="width:25%; height: 250px"></div>
<div style="width:25%; height: 250px"></div>
<div style="width:25%; height: 250px"></div>
</div>
My question is only about css, if it is possible to do this using only css, because I know that it is possible to achieve this goal using js.