I am trying to make the <img>
element's height match the height of the <h1></h1>
element.
For instance, if the height of the <h1></h1>
element is 10em, I want the <img>
element to also have a height of 10 em. However, I am facing an issue because I do not know the precise height of the <h1></h1>
element on every web browser.
I attempted to set the height of the <img>
element in percentages, but this approach did not yield the desired result. Can someone provide guidance on how to achieve this?
Below is the original code snippet:
<div class="row" style="margin-top: 1%;">
<div class="large-9 columns">
<h1><img src="img/UnionJR.png"> <a href="subjectlist.html#BrE" class="logo">English</a></h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</p>
</div>
<div class="large-3 columns">
<img src="http://placehold.it/350x150&text=Img">
</div>
</div>
Thank you!