-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml42.html
97 lines (92 loc) · 3.09 KB
/
html42.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Media Queries with CSS Grid</title>
<style>
.container{
display: grid;
grid-gap: 2rem;
grid-template-areas:
/* Isse voh poore row ko navbar se bhar denge ek tarah se fr kar dega */
'navbar navbar navbar navbar'
'section section aside aside'
'footer footer footer footer';
}
.example{
border: solid black 2px;
background-color: aliceblue;
}
#navbar{
grid-area: navbar;
}
#section{
grid-area: section;
}
#aside{
grid-area: aside;
}
footer{
grid-area: footer;
text-align: center;
}
@media only screen and (max-width:300px){
body{
background-color: yellow;
}
}
@media only screen and (min-width:300px) and (max-width:700px){
body{
background-color: aqua;
}
.container{
grid-template-areas:
/* Isse voh poore row ko navbar se bhar denge ek tarah se fr kar dega */
'navbar navbar navbar navbar'
'section section section section'
'aside aside aside aside'
'footer footer footer footer';
}
}
@media(min-width:700px) and (max-width:1000px){
body{
background-color: green;
}
.container{
grid-template-areas:
/* Isse voh poore row ko navbar se bhar denge ek tarah se fr kar dega */
'navbar navbar navbar navbar'
'section section section section'
/* 'aside aside aside aside' */
'footer footer footer footer';
}
#aside{
display: none;
}
}
@media (min-width:1000px){
body{
background-color: rgb(46, 32, 73);
}
}
</style>
</head>
<body>
<div class="container">
<nav class="example" id="navbar">
Home Contact About
</nav>
<section class="example" id="section">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Hic excepturi ad sequi dolores voluptatum aliquid nihil eum assumenda repudiandae necessitatibus.
</section>
<aside class="example" id="aside">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente beatae, in veniam cum, non sint aliquid alias nostrum quo saepe ut voluptatem tenetur quas minima, necessitatibus autem recusandae accusamus labore?
</aside>
<footer class="example">
Copyright © Reserved
</footer>
</div>
</body>
</html>