So I want my image to be automatically resized when screen resolution is under 740 pixels. This code is outside @media.
header img {
display: block;
height: 150px;
margin: auto;
}
@media screen and (max-width: 740px) {
header img {
display: block;
width: 100%;
height: auto;
}
}
<header>
<img src="https://images.vexels.com/media/users/3/137694/isolated/lists/35e10823069d1767521320dc34475465-triangle-logo-geometric.png">
</header>
This code is not working! Why? When I check the code in chrom dev tools, these properties are deleted out except width:100%;
!