I tried to use the
CSS media query
in order to give my website a little responsiveness(it's just kinda prototyping though)but the media query isn't working. All I wanted was to make thecontainer
disappear.
*
{
margin: 0;
padding: 0;
}
body
{
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container
{
width: 900px;
height: 500px;
background-color: #494d5f;
display: grid;
grid-template-columns: 300px 300px 300px;
}
.container>div
{
border: 2px solid green;
color: white;
font-size: 40px;
}
.container>:last-child
{
margin-right: 0;
}
span
{
color: white;
font-size: 50px;
}
@media screen and (max-width: 600px) {
.container {
display: none;
}
}
<!DOCTYPE html>
<html>
<head>
<title>Wallpaper Carousel</title>
<link rel="stylesheet" type="text/css" href="index.css">
</head>
<body>
<div class="container">
<div class="first">1</div>
<div class="second"><span class="before">a</span>1<span class="after">b</span></div>
<div class="third">3</div>
</div>
<script type="text/javascript" src="index.js"></script>
</body>
</html>