From e500461f4348a9544d77ad1aa506bab4cc649c08 Mon Sep 17 00:00:00 2001 From: Julian Ng Date: Fri, 9 Jun 2023 12:12:37 +0100 Subject: [PATCH] CSS: header, footer, combinator --- 02-css/style.css | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/02-css/style.css b/02-css/style.css index 66b0793..ed79e77 100644 --- a/02-css/style.css +++ b/02-css/style.css @@ -28,3 +28,37 @@ a { a:hover { color: #ffb703 } + +header { + background-color: #1212B2; + padding: 24px; + text-align: center; +} + +main { + /* `main` element does not need any styles */ +} + +footer { + background-color: #1212B2; + padding: 32px; +} + +/* +This is the "descendant combinator". +*/ +footer p { + font-size: 16px; + color: white; + margin-bottom: 10px; + text-align: right; +} + +/* +We could also be more specific and use the "child combinator": +footer > div > p { + ... +} + +Read more here: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors#combinators +*/