I am trying to build a header with 3 columns. One image in each column. I need the images to resize to fit the height of the header.
My images have 100px x 100px resolution.
So with heights higher than 100px the resizing is working fine:
But with with heights smaller than 100px the image is not resizing.
Here is my HTML
<body>
<div id="header">
<div class="headergridelement"><img alt="" src="file:///C:/.../info100x100.jpg"></div>
<div class="headergridelement"><img alt="" src="file:///C:/.../info100x100.jpg"></div>
<div class="headergridelement"><img alt="" src="file:///C:/.../info100x100.jpg"></div>
</div>
</body>
and here is the css I am using.
#header {
display: grid;
grid-template-columns: auto auto auto;
position: fixed;
width: 100%;
text-align: center;
height:100%;
}
#header .headergridelement {
background-color: rgba(255, 255, 255, 1);
}
#header img {
height:100%;
}
body {
margin-top: 0px;
margin-left: 0px;
}
What property I am missing?