diff --git a/foundations/01-css-methods/README.md b/foundations/01-css-methods/README.md index 8cc79c1..c34458f 100644 --- a/foundations/01-css-methods/README.md +++ b/foundations/01-css-methods/README.md @@ -1,9 +1,13 @@ # Methods for Adding CSS -In this exerrcise, you're going to practice adding CSS to an HTML file using all three methods: external CSS, internal CSS, and inline CSS. +In this exerrcise, you're going to practice adding CSS to an HTML file using all three methods: external CSS, internal CSS, and inline CSS. You should only be using type selectors for this exercise when adding styles via the external and internal methods. You should also use keywords for colors (e.g. "blue" instead of using RGB or HEX values). -There are three elements for you to add styles to, each of which uses a different method of adding CSS to it, as noted in the outcome image below. All other exercises in this section will have a CSS file provided and linked for you, but for this exercise you will have to create the file and link it in the HTML file yourself. +There are three elements for you to add styles to, each of which uses a different method of adding CSS to it, as noted in the outcome image below. All other exercises in this section will have a CSS file provided and linked for you, but for this exercise you will have to create the file and link it in the HTML file yourself. This is all about practicing using these different methods and getting the syntax right. -You should only be using type selectors for this exercise when adding styles via the external and internal methods. +The properties you need to add to each element are: + +* `div`: a red background, white text, a font size of 32px, center aligned, and bold +* `p`: a green background, white text, and a font size of 18px +* `button`: an orange background and a font size of 18px ## Desired Outcome diff --git a/foundations/01-css-methods/index.html b/foundations/01-css-methods/index.html new file mode 100644 index 0000000..9256151 --- /dev/null +++ b/foundations/01-css-methods/index.html @@ -0,0 +1,14 @@ + + +
+ + + +I would like to be styled with the internal method, please.
+ + + \ No newline at end of file diff --git a/foundations/01-css-methods/solution/solution.css b/foundations/01-css-methods/solution/solution.css new file mode 100644 index 0000000..2ae67ef --- /dev/null +++ b/foundations/01-css-methods/solution/solution.css @@ -0,0 +1,7 @@ +div { + text-align: center; + background-color: red; + color: white; + font-size: 32px; + font-weight: bold; +} \ No newline at end of file diff --git a/foundations/01-css-methods/solution/solution.html b/foundations/01-css-methods/solution/solution.html new file mode 100644 index 0000000..d9ceb3b --- /dev/null +++ b/foundations/01-css-methods/solution/solution.html @@ -0,0 +1,23 @@ + + + + + + +I would like to be styled with the internal method, please.
+ + + \ No newline at end of file diff --git a/foundations/02-class-id-selectors/README.md b/foundations/02-class-id-selectors/README.md index 09219ec..32880ed 100644 --- a/foundations/02-class-id-selectors/README.md +++ b/foundations/02-class-id-selectors/README.md @@ -3,7 +3,14 @@ Knowing how to add class and ID attributes to HTML elements, as well as use thei There are several elements in the HTMl file provided, which you will have to add either class or ID attributes to as noted in the outcome image below. You will then have to add rules in the CSS file provided using the correct selector syntax. Look over the outcome image carefully, and try to keep in mind what elements look similarly styled (classes), which ones may be completely unique from the rest (ID), and which ones have slight variations from others (multiple classes). -It isn't entirely important what class or ID values you use, as the focus here is being able to add the attributes and use the correct selector syntax to style elements. +It isn't entirely important what class or ID values you use, as the focus here is being able to add the attributes and use the correct selector syntax to style elements. For the colors in this exercise, try using a non-keyword value (RGB, HEX, or HSL). The properties you need to add to each element are: + +* **All odd numbered elements**: a light red/pink background, and a list of fonts containing `Verdana` as the first option and `sans-serif` as a fallback +* **The second element**: blue text and a font size of 36px +* **The third element**: in addition to the styles for all odd numbered elements, add a font size of 24px +* **The fourth element**: a light green background, a font size of 24px, and bold + +Quick tip: in VS Code, you can change which format colors are displayed in (RGB, HEX, or HSL) by hovering over the color value in the CSS and clicking the top of the popup that appears! ## Desired Outcome diff --git a/foundations/02-class-id-selectors/index.html b/foundations/02-class-id-selectors/index.html new file mode 100644 index 0000000..118fa66 --- /dev/null +++ b/foundations/02-class-id-selectors/index.html @@ -0,0 +1,17 @@ + + + + + + +Number 1 - I'm a class!
+Number 3 - I'm a class, but cooler!
+Number 5 - I'm a class!
+ + \ No newline at end of file diff --git a/foundations/02-class-id-selectors/solution/solution.css b/foundations/02-class-id-selectors/solution/solution.css new file mode 100644 index 0000000..3cd7120 --- /dev/null +++ b/foundations/02-class-id-selectors/solution/solution.css @@ -0,0 +1,19 @@ +.odd { + background-color: rgb(255, 167, 167); + font-family: Verdana, sans-serif; +} + +.oddly-cool { + font-size: 24px; +} + +#two { + color: #0000ff; + font-size: 36px; +} + +#four { + background-color: hsl(120, 100%, 75%); + font-size: 24px; + font-weight: bold; +} \ No newline at end of file diff --git a/foundations/02-class-id-selectors/solution/solution.html b/foundations/02-class-id-selectors/solution/solution.html new file mode 100644 index 0000000..d7c955e --- /dev/null +++ b/foundations/02-class-id-selectors/solution/solution.html @@ -0,0 +1,17 @@ + + + + + + +Number 1 - I'm a class!
+Number 3 - I'm a class, but cooler!
+Number 5 - I'm a class!
+ + \ No newline at end of file diff --git a/foundations/02-class-id-selectors/style.css b/foundations/02-class-id-selectors/style.css new file mode 100644 index 0000000..e69de29 diff --git a/foundations/03-grouping-selectors/README.md b/foundations/03-grouping-selectors/README.md index a99286f..12e02f4 100644 --- a/foundations/03-grouping-selectors/README.md +++ b/foundations/03-grouping-selectors/README.md @@ -2,9 +2,13 @@ Let's build a little off the previous exercise, where you (hopefully) added multiple classes to a single element in order to apply two different rules to it. -Instead of having a single element with two different rules applied, though, we're instead going to give two elements each a unique class name, then add rules for styles that both elements share as well as their own unique styles. Make sure you take a good look at the outcome image below to see exactly what is unique about each element, and what both elements have in common. +Instead of having a single element with two different rules applied, though, you're instead going to give two elements each a unique class name, then add rules for styles that both elements share as well as their own unique styles. Make sure you take a good look at the outcome image below to see exactly what is unique about each element, and what both elements have in common. -This will help you further practice adding classes and using class selectors, so be sure you add the class attribute in the HTML file. +This will help you further practice adding classes and using class selectors, so be sure you add the class attribute in the HTML file. For the remainder of these exercises, the format of any colors is entirely up to you, we trust you'll practice using the different values! The properties you need to add to each element are: + +* **The first element**: a black background and white text +* **The second element**: a yellow background +* **Both elements**: a font size of 28px and a list of fonts containing `Helvetica` and `Times New Roman`, with `sans-serif` as a fallback ## Desired Outcome diff --git a/foundations/03-grouping-selectors/index.html b/foundations/03-grouping-selectors/index.html new file mode 100644 index 0000000..de0314e --- /dev/null +++ b/foundations/03-grouping-selectors/index.html @@ -0,0 +1,14 @@ + + + + + + +This should be styled.
+This should be unstyled.
+This should be unstyled.
+This should be styled.
+This should be styled.
+This should be styled.
+This should be unstyled.
+This should be unstyled.
+This should be styled.
+This should be styled.
+