i am about to cry i cant solve this problem. I have this Code.i want to create three media queries. The first one you can see on the code is 320px and 768 px. I did put everything in a container so if i write this#container it means everything within the container. But i am confused how i am supposed to get this website into a responsive one. even with some youtube videos i couldnt solve it.
<html>
<head>
<meta charset="UTF-8">
<title>responsive Layout</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
#container {
margin: 0 auto;
width: 960px;
}
header {
width: 960px;
height: 100px;
margin: 0 0 20px 0;
float: left;
background-color: #666;
}
main {
width: 700px;
height: 500px;
margin: 0 20px 0 0;
float: left;
background-color: #CCC;
}
aside {
width: 240px;
height: 500px;
float: left;
background-color: #666;
}
@media screen and(min-width: 320px)and (max-width:768px)
</style>
</head>
<body>
<div id="container">
<header>Header</header>
<main>Content</main>
<aside>Sidebar</aside>
</div>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire