From d031f5ee79d87eaf7e6959e3e5a497604f6ab9b9 Mon Sep 17 00:00:00 2001 From: NetMan <13informatyka14@gmail.com> Date: Thu, 28 Dec 2023 18:46:48 +0100 Subject: [PATCH] Completed exercise 03 in another way Further explanation in README in Solution section Solution similar to exercise 02 --- 03-grouping-selectors/README.md | 4 ++++ 03-grouping-selectors/style.css | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/03-grouping-selectors/README.md b/03-grouping-selectors/README.md index 8b5d206..58f9ec6 100644 --- a/03-grouping-selectors/README.md +++ b/03-grouping-selectors/README.md @@ -18,3 +18,7 @@ This will help you further practice adding classes and using class selectors, so - Does each element have a unique class name? - Did you use the grouping selector for styles that both elements share? - Did you make separate rules for the styles unique to each element? + +# Solution + +The same as in exercise 02, instead of classes, IDs, element names, I used nth-child and * to point to elements. \ No newline at end of file diff --git a/03-grouping-selectors/style.css b/03-grouping-selectors/style.css index e69de29..2f57938 100644 --- a/03-grouping-selectors/style.css +++ b/03-grouping-selectors/style.css @@ -0,0 +1,13 @@ +body > *:nth-child(1) { + background-color: black; + color: white; +} + +body > *:nth-child(2) { + background-color: yellow; +} + +body > * { + font-size: 28px; + font-family: Helvetica, "Times New Roman", sans-serif; +}