I have the following HTML that uses a flex container
to house two divs, one containing an image (on the left) and the other one has some text:
<!DOCTYPE html>
<html>
<body>
<div id="wrapper" style="display:flex; background:pink;">
<div id="image_div">
<img src="http://i.imgur.com/MvnfA1U.png">
</div>
<div id="number_list">
<h3>One</h3>
<h3>Two</h3>
<h3>Three</h3>
<h3>Four</h3>
<h3>Five</h3>
<h3>Six</h3>
<h3>Seven</h3>
</div>
</div>
</body>
</html>
Which results in the following:
How do I get the image to increase in size and take the full height of its (pink) container, while:
- Keeping the image adjacent to the text (only pushing as far right as it needs to go)
- Maintaining the image's aspect ratio
- Without cutting off part of the image
- Without having text overlap the image
- Keeping it generic (eg no specifying pixel lengths)
Thanks