From 2faf62fee3b4b7ab76d9b1565afcd236535652f8 Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 13:46:01 -0400 Subject: [PATCH 1/9] Completed the display section of the challenges. --- my-styles.css | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/my-styles.css b/my-styles.css index f7d02e4..2fcb64e 100644 --- a/my-styles.css +++ b/my-styles.css @@ -1,4 +1,29 @@ /* Your Stylesheet */ - +#display-01 div { + display: inline; + border: thin solid blue; + margin: 0px 20px 0px 20px; +} +#display-02 span { + display: block; + border: thin solid red; + margin: 0px; +} +#display-03 div { + display: inline; + border: thin solid green; + padding: 5px; + background: green; +} +#display-04 div:first-of-type { + display: none; +} +#display-05 a { + font-size: 4rem; + background: grey; + padding: 10px 0px 10px 0px; + margin: auto; + text-align: center; + display: block; +} /* All your edits should go here */ - From 0fb5f416843f8a22323aa60955519d46ff63a7f4 Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 13:59:28 -0400 Subject: [PATCH 2/9] Finished the Box Model section. --- my-styles.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/my-styles.css b/my-styles.css index 2fcb64e..9e28012 100644 --- a/my-styles.css +++ b/my-styles.css @@ -26,4 +26,18 @@ text-align: center; display: block; } +#boxmodel-01 div { + box-sizing: content-box; + margin: 0 auto; + width: 50%; + padding: 30px 30px 30px 30px; + border: thick solid black; +} +#boxmodel-02 div { + box-sizing: content-box; + width: 50%; + padding: 30px; + border: thick solid black; + margin: 0 auto; +} /* All your edits should go here */ From 400f33ee6d4267ed0ae8269025a3ee849a79d9f7 Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 14:28:39 -0400 Subject: [PATCH 3/9] Fixed display-05 and stopped at float-04 for a break. --- my-styles.css | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/my-styles.css b/my-styles.css index 9e28012..464d11a 100644 --- a/my-styles.css +++ b/my-styles.css @@ -19,11 +19,10 @@ display: none; } #display-05 a { - font-size: 4rem; background: grey; padding: 10px 0px 10px 0px; - margin: auto; - text-align: center; + margin: 0 auto; + width: 50%; display: block; } #boxmodel-01 div { @@ -40,4 +39,23 @@ border: thick solid black; margin: 0 auto; } +#float-01 img { + float: left; + margin: 1em 10px 10px 0px; +} +#float-02 img { + float: right; + margin: 1em 0px 10px 10px; +} +#float-02 p { + text-align: justify; +} +#float-03 img { + float: left; + margin: 1em; +} +#float-03 .clear { + clear: both; +} +#float-04 /* All your edits should go here */ From 9e8bd543db584848dbc4073b98921c2f6357c35b Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 15:28:05 -0400 Subject: [PATCH 4/9] Finished the float section after my break. --- my-styles.css | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/my-styles.css b/my-styles.css index 464d11a..fa39f36 100644 --- a/my-styles.css +++ b/my-styles.css @@ -57,5 +57,45 @@ #float-03 .clear { clear: both; } -#float-04 +#float-04 img { + float: left; + margin: 1em; +} +#float-04 div { + background: lightblue; + content: ""; + display: table; + clear: both; +} +#float-05 p:first-child { + box-sizing: border-box; + float: left; + width: 50%; + padding-right: 10px; +} +#float-05 p:last-child { + box-sizing: border-box; + float: right; + width: 50%; + padding-left: 10px; + border-left: thin solid black; +} +#float-06 div p:first-child { + box-sizing: border-box; + float: left; + width: 50%; + padding-right: 10px; + border-right: thin solid black; +} +#float-06 div p:last-child { + box-sizing: border-box; + float: right; + width: 50%; + padding-left: 10px; +} +#float-06 div::after { + content: ""; + display: table; + clear: both; +} /* All your edits should go here */ From 8a2ffcef854fac0c430813eb737f17ac698827ee Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 15:46:09 -0400 Subject: [PATCH 5/9] Finished up to position 2. Starting position 3. --- my-styles.css | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/my-styles.css b/my-styles.css index fa39f36..3835ead 100644 --- a/my-styles.css +++ b/my-styles.css @@ -98,4 +98,40 @@ display: table; clear: both; } +#position-01 div { + width: 40px; + height: 40px; + background: red; +} +#position-01 div:nth-child(even) { + display: inline-block; + position: relative; + top: 0px; + bottom: 20px; + left: 40px; +} +#position-02 div { + border: thin solid black; +} +#position-02 span:nth-child(1){ + position: absolute; + top: 0px; + left: 0px; +} +#position-02 span:nth-child(2) { + position: absolute; + top: 0px; + right: 0px; +} +#position-02 span:nth-child(3) { + position: absolute; + bottom: 0px; + right: 0px; +} +#position-02 span:nth-child(4) { + position: absolute; + bottom: 0px; + left: 0px; +} + /* All your edits should go here */ From d26df9177a67ce673cb7efbb5f43f3e6d1f316a1 Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 16:18:29 -0400 Subject: [PATCH 6/9] Took a while on Position 3, almost end of day save. --- my-styles.css | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/my-styles.css b/my-styles.css index 3835ead..ed8b383 100644 --- a/my-styles.css +++ b/my-styles.css @@ -133,5 +133,29 @@ bottom: 0px; left: 0px; } - +#position-03 div { + position: relative; + border: thin solid black; + height: 100px; +} +#position-03 span:nth-child(1) { + position: absolute; + top: 0px; + left: 0px; +} +#position-03 span:nth-child(2) { + position: absolute; + top: 0; + right: 0; +} +#position-03 span:nth-child(3) { + position: absolute; + bottom: 0; + right: 0; +} +#position-03 span:nth-child(4) { + position: absolute; + bottom: 0; + left: 0; +} /* All your edits should go here */ From 768be50da13d5fc54234d4e1c9c531c19aed1084 Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 16:22:49 -0400 Subject: [PATCH 7/9] started position 4 --- my-styles.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/my-styles.css b/my-styles.css index ed8b383..0da314a 100644 --- a/my-styles.css +++ b/my-styles.css @@ -158,4 +158,8 @@ bottom: 0; left: 0; } +#position-04 div { + position: absolute; + top: 0; +} /* All your edits should go here */ From 4c2c8cd3efc4e1f401f5729f4f044e47f890f32d Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 17:55:16 -0400 Subject: [PATCH 8/9] Finished the position exercises. --- my-styles.css | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/my-styles.css b/my-styles.css index 0da314a..9ca4808 100644 --- a/my-styles.css +++ b/my-styles.css @@ -158,8 +158,54 @@ bottom: 0; left: 0; } +section#position-04 { + position: static; +} #position-04 div { position: absolute; top: 0; } +#position-05 .outer-box:first-child { + position: relative; + background: lightgray; + width: 4rem; + height: 4rem; + top: 1rem; + left: 0; +} +#position-05 .outer-box:last-child { + position: relative; + background: lightgray; + width: 4rem; + height: 4rem; + top: -3rem; + left: 20rem; +} +#position-05 .inner-box { + position: relative; + background: darkgray; + width: 1rem; + height: 1rem; + top:1.5rem; + left:1.5rem; +} +#position-06 div { + position: absolute; + background: lavender; + margin: 0; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +#position-07 a { + position: fixed; + top: 92%; + left: 85%; + background: grey; + padding: 10px; +} +#position-07 a:hover { + color: green; +} /* All your edits should go here */ From dd18b2b82e4d7ee88fe90fbfc7f41a54f60ded97 Mon Sep 17 00:00:00 2001 From: Eric Moyer Date: Thu, 19 Sep 2019 19:02:44 -0400 Subject: [PATCH 9/9] Attempted Layout section. --- my-styles.css | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/my-styles.css b/my-styles.css index 9ca4808..3d790a2 100644 --- a/my-styles.css +++ b/my-styles.css @@ -202,10 +202,50 @@ section#position-04 { position: fixed; top: 92%; left: 85%; - background: grey; + background-color: #ffee00; padding: 10px; } #position-07 a:hover { color: green; } +section#layout { + background: lightgrey; +} +#layout nav { + position: absolute; + margin: 0; + top: 0; + left: 0; + right: 0; + bottom: 97%; + background: lightblue; +} +#layout aside { + box-sizing: border-box; + float: right; + background: forestgreen; + color: white; + width: 50%; + margin: 5px -5rem 5px 5px; + padding: 5px; + border: solid black; +} +#layout a { + position: relative; + padding: 5px; + top: 25%; + left: 5%; + border: solid blue; + margin: 0 -3px; +} +#layout footer { + position: absolute; + margin: 0; + top: 97%; + left: 0; + right: 0; + bottom: 0; + background: crimson; + text-align: center; +} /* All your edits should go here */