Reputation: 147
I try to add margin to div when window is bigger than 1205px, but the problem is when the browser is bigger, the margin will not add to map-container not even when I use <meta name="viewport" content="width=device-width, initial-scale=1.0">
. Any suggestions how to fix or what I do wrong ?
@media screen and (min-width: 1205px) {
.map-container {
margin-top: 71px !important;
}
}
<div class="map-container">
<div id="map" style="width: 100%;height:400px">Map</div>
</div>
Upvotes: 0
Views: 98
Reputation: 405
Your map-container {...}
bit is wrong.
If your map-container is an id (i.e. <something id="map-container">
) change that to #map-container {...}
and if it is a class (i.e. <something class="map-cotainer">
) change it to .map-container {...} instead.
Did my answer solve your issue? Please make sure to mark it as accepted to help other people with the same problem.
Upvotes: 1