-
Notifications
You must be signed in to change notification settings - Fork 0
/
grid-area.css
55 lines (52 loc) · 1.17 KB
/
grid-area.css
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
/* define grid areas */
.header{
grid-area: header;
}
.nav{
grid-area: nav;
}
.main{
grid-area: main;
}
.aside{
grid-area: aside;
}
.advertising{
grid-area: advertising;
}
.footer{
grid-area: footer;
}
.header,.nav,.main,.aside,.advertising,.footer{
background-color: bisque;
}
.grid-container{
display: grid;
gap:20px;
grid-template-columns: 1fr 4fr 1fr;
grid-template-areas: "header header header header header header"
"nav main main main main aside "
"nav main main main main advertising"
"footer footer footer footer footer footer"
;
}
@media screen and (max-width:576px) {
.grid-container{
grid-template-columns: 1fr;
grid-template-areas: "header"
"nav"
"main"
"aside"
"advertising"
"footer";
}
}
@media screen and (min-width:577px) and (max-width:992px) {
.grid-container{
grid-template-columns:1fr 3fr;
grid-template-areas: "header header header header"
"nav nav nav nav"
"aside main main main"
"advertising footer footer footer";
}
}