I'm adapting a css grid-based layout to a flex-based one, and I have tried all the various ways I've read to make sure an image in that layout maintains its aspect ratio, but for some reason, if it's correct in Firefox, it's different in IE11, and if it's correct in IE11 it's wrong in Firefox. The layout is a simple one (I think). It has an overall flex column container for the page, and then a smaller flex row at the "bottom". Any idea what's going wrong and how I can get the image to display at its correct aspect ratio regardless of browser? I have attached a screen capture of how the small image displays.
![IE11 (on the left) and in Firefox (on the right). The small rectangle at the bottom between the menu and the temporary message is the image that is not displaying correctly.]1
Thanks.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style media="screen">
* {
margin: 0;
color: white;
box-sizing: border-box;
}
body, html {
background-color: black;
}
.homepageflexcontainer {
display: flex;
flex-direction: column;
justify-content: center;
}
.innerflexcontainer {
display: flex;
flex-direction: row;
justify-content: center;
}
#homepageimage {
align-self: center;
width: 100vw;
min-width: 280px;
max-width: 1400px;
min-height: 165px;
max-height: 823px;
}
div.message {
text-align: right;
min-width: 14em;
font-size: calc(12px + 0.5vw);
line-height: 1.25em;
}
img.logo {
min-width: 70px;
width: auto;
max-height: 50%;
padding-left: 10px;
padding-right: 10px;
padding-top: .3vw;
}
</style>
</head>
<body>
<div class="homepageflexcontainer">
<img id="homepageimage" src="HomePage(big).png" alt="">
<div class="innerflexcontainer">
<div class="message">temporary message</div>
<img class="logo" src="logo.jpg" alt="">
<nav>
<li>menu item</li>
<li>menu item</li>
<li>menu item</li>
<li>menu item</li>
<li>menu item</li>
</nav>
</div>
</div>
</body>