-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
58 lines (49 loc) · 1.18 KB
/
style.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
56
57
58
* {
margin: 0;
padding: 0;
}
.grid {
display: grid; /* defines css grid */
grid-template-columns: 1fr 1fr; /* can use % of width and auto also */
grid-template-areas: /* allows us to put these class elements wherever we want on the page */
"title title"
"header header"
"sidebar sidebar"
"content content"
"footer footer";
grid-gap: 10px; /* creates gap between the grids */
}
.title {
grid-area: title;
}
.header {
grid-area: header;
}
.sidebar {
grid-area: sidebar;
}
.content {
grid-area: content;
}
.footer {
grid-area: footer;
}
.grid div:nth-child(even) {
background-color: red;
}
.grid div:nth-child(odd) {
background-color: green;
}
@media screen and (min-width: 736px)
{
.grid {
display: grid; /* defines css grid */
grid-template-columns: 1fr 500px 500px 1fr; /* can use % of width and auto also */
grid-template-areas: /* allows us to put these class elements wherever we want on the page */
/* use . to leave whitespace -> has effect of creating a wrapper */
". title title ."
". header header ."
". sidebar content ."
". footer footer .";
}
}