diff --git a/foundations/block-and-inline/01-margin-and-padding-1/style.css b/foundations/block-and-inline/01-margin-and-padding-1/style.css index f4d0a7084532..8e407906c342 100644 --- a/foundations/block-and-inline/01-margin-and-padding-1/style.css +++ b/foundations/block-and-inline/01-margin-and-padding-1/style.css @@ -7,15 +7,15 @@ body { background: pink; border: 3px solid blue; /* CHANGE ME */ - padding: 0px; - margin: 0px; + padding: 32px; + margin: 12px; } .two { background: lightblue; border: 3px solid purple; /* CHANGE ME */ - margin-bottom: 0px; + margin-bottom: 48px; } .three { @@ -23,6 +23,8 @@ body { border: 3px solid brown; width: 200px; /* CHANGE ME */ - padding: 0px; - margin-left: 0px; -} \ No newline at end of file + padding: 32px; + margin-left: auto; + +} +/*exerise has already been solved.*/ \ No newline at end of file diff --git a/foundations/block-and-inline/02-margin-and-padding-2/style.css b/foundations/block-and-inline/02-margin-and-padding-2/style.css index 00d1de59bf90..2538f67f8021 100644 --- a/foundations/block-and-inline/02-margin-and-padding-2/style.css +++ b/foundations/block-and-inline/02-margin-and-padding-2/style.css @@ -1,3 +1,6 @@ +*{ + box-sizing: border-box; +} body { background: #eee; font-family: sans-serif; @@ -6,22 +9,41 @@ body { .card { width: 400px; background: #fff; - margin: 16px auto; + margin: auto; + padding: 8px; } .title { background: #e3f4ff; + margin: 8px; + padding: 8px; } .content { background: #e3f4ff; + display:block; + margin: 8px; + padding-top: 16px; + padding-bottom: 16px; + padding-left: 8px; + padding-right: 8px; } .button-container { background: #e3f4ff; + display:block; + margin: 8px; + padding: 8px; + text-align: center; } button { background: white; border: 1px solid #eee; -} \ No newline at end of file + display: block; + padding: 8px 24px 8px 24px; + margin: 0px auto; +} + +/*.button-container, .content, .title, .button, .card { + border: 2px red solid;*/ \ No newline at end of file diff --git a/foundations/cascade/01-cascade-fix/index.html b/foundations/cascade/01-cascade-fix/index.html index 0c5b22717488..153498c475b1 100644 --- a/foundations/cascade/01-cascade-fix/index.html +++ b/foundations/cascade/01-cascade-fix/index.html @@ -20,3 +20,4 @@ + diff --git a/foundations/cascade/01-cascade-fix/style.css b/foundations/cascade/01-cascade-fix/style.css index daf07e0e8a47..e64f8d0e8c31 100644 --- a/foundations/cascade/01-cascade-fix/style.css +++ b/foundations/cascade/01-cascade-fix/style.css @@ -8,17 +8,18 @@ body { font-weight: 800; } -.small-para { - font-size: 14px; - font-weight: 800; -} - +/* just repositioned this .para class selector above .small-para. This ensures this class property gets overruled by the one below it. */ .para { font-size: 22px; } -.confirm { - background: green; +.small-para { + font-size: 14px; + font-weight: 800; +} +/*changed background to background-color as error correction. Also, chained classes together to get precedence.*/ +.confirm.button { + background-color: green; color: white; font-weight: bold; } @@ -28,8 +29,8 @@ body { color: rgb(0, 0, 0); font-size: 20px; } - -.child { +/*chained three selectors to target the child div element, and give this precedence over the 2-chained selector below. */ +div.child.text { color: rgb(0, 0, 0); font-weight: 800; font-size: 14px; diff --git a/foundations/flex/01-flex-center/style.css b/foundations/flex/01-flex-center/style.css index e35feacd28d0..ecc05b2fdd5e 100644 --- a/foundations/flex/01-flex-center/style.css +++ b/foundations/flex/01-flex-center/style.css @@ -3,13 +3,19 @@ border: 4px solid midnightblue; width: 400px; height: 300px; + display: flex; + justify-content: center; /* centers the flex items horizontally */ + align-items: center; } -.box { +.container > .box { background: palevioletred; font-weight: bold; text-align: center; border: 6px solid maroon; width: 80px; height: 80px; -} \ No newline at end of file +} + +/* man i just learned a bit of flexbox and it seems pretty easy so far! Plus, i just wanted to wrap today with a few pushed commits hehe! +/* flex container contain flex items, and mostly you can just apply css properties or rules to the flex container to tweak the child flex items' alignment and order and basically everything. \ No newline at end of file diff --git a/foundations/flex/02-flex-header/style.css b/foundations/flex/02-flex-header/style.css index cb598c935480..619ddda71a05 100644 --- a/foundations/flex/02-flex-header/style.css +++ b/foundations/flex/02-flex-header/style.css @@ -1,6 +1,10 @@ .header { font-family: monospace; background: papayawhip; + display: flex; + justify-content: space-between; + align-items: center; + padding: 8px; } .logo { @@ -13,7 +17,12 @@ ul { /* this removes the dots on the list items*/ + list-style-type: none; + display: flex; + padding: 0; + margin: 0; + gap: 8px; } a { @@ -22,4 +31,5 @@ a { padding: 8px; /* this removes the line under the links */ text-decoration: none; -} \ No newline at end of file +} + diff --git a/foundations/flex/03-flex-header-2/index.html b/foundations/flex/03-flex-header-2/index.html index 21d56170b0b8..5fabc457da05 100644 --- a/foundations/flex/03-flex-header-2/index.html +++ b/foundations/flex/03-flex-header-2/index.html @@ -9,18 +9,22 @@
- \ No newline at end of file diff --git a/foundations/flex/03-flex-header-2/style.css b/foundations/flex/03-flex-header-2/style.css index bf4c8af10d4c..cb48ad860249 100644 --- a/foundations/flex/03-flex-header-2/style.css +++ b/foundations/flex/03-flex-header-2/style.css @@ -12,6 +12,9 @@ body { background: white; border-bottom: 1px solid #ddd; box-shadow: 0 0 8px rgba(0,0,0,.1); + display: flex; + justify-content: space-between; + padding: 8px; } .profile-image { @@ -27,6 +30,7 @@ body { font-size: 32px; font-weight: 900; font-style: italic; + margin: 0px; } button { @@ -34,15 +38,28 @@ button { border-radius: 8px; background: rebeccapurple; color: white; - padding: 8px 24px; + padding: 8px 24px } a { /* this removes the line under our links */ text-decoration: none; color: rebeccapurple; + margin: 0px; + padding: 0px; } ul { list-style-type: none; + display: flex; + gap: 16px; + padding: 0px; + margin: 0px; + align-items: center; +} + +.left, .right { + align-items: center; + display: flex; + gap: 16px; } diff --git a/foundations/flex/04-flex-information/index.html b/foundations/flex/04-flex-information/index.html index 3cc3efd262ae..fa82bce3b942 100644 --- a/foundations/flex/04-flex-information/index.html +++ b/foundations/flex/04-flex-information/index.html @@ -8,20 +8,28 @@ -
Information!
- - barberry -
This is a type of plant. We love this one.
- - chili -
This is another type of plant. Isn't it nice?
+
Information!
+
+
+ barberry +
This is a type of plant. We love this one.
+
- pepper -
We have so many plants. Yay plants.
+
+ chili +
This is another type of plant. Isn't it nice?
+
- saffron -
I'm running out of things to say about plants.
+
+ pepper +
We have so many plants. Yay plants.
+
+
+ saffron +
I'm running out of things to say about plants.
+
+