Consider the following markup:
<div id="container">
<div id="top">
<img />
</div>
<div id="bottom">
Some text, there we go.
</div>
</div>
<img> has fixed height. Width of top and bottom is dynamic. top‘s content may be wider than bottom‘s content and vice versa. I need to make it so that bottom‘s width is equal to top‘s width at all times.
Can this be done with pure CSS? Or is JS neccessary?
There is a way to do this via pure CSS (courtesy of Artem Polikarpov (in Russian))