Skip to content

Commit e500461

Browse files
committed
CSS: header, footer, combinator
1 parent 3bb8eae commit e500461

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

02-css/style.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,37 @@ a {
2828
a:hover {
2929
color: #ffb703
3030
}
31+
32+
header {
33+
background-color: #1212B2;
34+
padding: 24px;
35+
text-align: center;
36+
}
37+
38+
main {
39+
/* `main` element does not need any styles */
40+
}
41+
42+
footer {
43+
background-color: #1212B2;
44+
padding: 32px;
45+
}
46+
47+
/*
48+
This is the "descendant combinator".
49+
*/
50+
footer p {
51+
font-size: 16px;
52+
color: white;
53+
margin-bottom: 10px;
54+
text-align: right;
55+
}
56+
57+
/*
58+
We could also be more specific and use the "child combinator":
59+
footer > div > p {
60+
...
61+
}
62+
63+
Read more here: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors#combinators
64+
*/

0 commit comments

Comments
 (0)