See the example structure first.
.follow-window-size-container {
height: 100vh;
background-color: green;
}
container-of-svg {
max-height: 100%;
}
container-of-svg svg {
max-height: 100%;
}
<div class="follow-window-size-container">
<div class="container-of-svg">
<img src="http://imgh.us/EU_food_contact_material_symbol.svg"alt="">
</div>
</div>
My goal is for the SVG image (along with its container) to compress and follow the same height as follow-window-size-container
(which follows the height of the window).
The right thing would be to work this way, I think, since max-height
forces the element not to exceed a certain height. Strangely, I can not use it now ...