I'm creating a products section for my website, and have been having trouble making it responsive, as media queries refuse to work. Here's my code:
HTML
<div id="products" class="products">
<h3>Our Products</h3>
</div>
CSS
.products {
height: 30vh;
width: 80%;
margin-top: 15%;
margin-left: 10%;
}
@media only screen and (max-width: 600px) {
.products {
height: 30vh;
width: 80%;
background: #333;
margin-top: 50%;
margin-left: 10%;
z-index: 2;
}
}
Even though the margin-top for mobile is supposed to be 50%, it doesn't change when i change the value, any insights into what might be causing the problem.