I have a few consecutive section elements each of which contains a heading tag. Would it be possible to force the browser to render those heading tags with exactly the same heights using just the CSS (making the browser use the largest computed value without actually specifying an exact value). Following code fragment should provide you with a clearer picture of what I have in place and which parts I want the browser to render using the largest computed value of height.
<section>
<h2>Heading One</h2>
<img src = ''>
<p>Some Text</p>
</section>
<section>
<h2>Heading Two</h2>
<img src = ''>
<p>Some Text</p>
</section>
<section>
<h2>Heading Three</h2>
<img src = ''>
<p>Some Text</p>
</section>
As some of the headings in this structure can have text that spans a couple of lines resulting in varying heights for the headings, I would like to know a solution using CSS, if one exists, that can force the browser to use the largest value of height of the three heading tags for all three of the tags.
Notes:
- All three of the sections in this scenario would be placed in a row horizontally next to each other, which necessitates balancing the height of the major heading elements.
- Use of Javascript is not permitted.
- Although heading elements can be taken out of the section elements, but I would like to keep the semantics.
Based on the aforementioned, if a solution can be found, then I would greatly appreciate your input.