How do I make all divs the same width as its narrowest sibling.
Eg: I have a:
<div class="wrapper">
<div class="div1">Hello</div>
<div class="div2">Hello this s some text</div>
</div>
Here I want to make the div2
element the same width as its narrowest sibling (div1
) without changing the HTML part.