From a2e909d58791cf22e39d6a66f0e91e9882d13d0d Mon Sep 17 00:00:00 2001
From: owen-webb
Date: Mon, 29 Aug 2022 18:23:23 -0600
Subject: [PATCH 01/11] section-4: Implemented basic float layout.
---
starter/04-CSS-Layouts/index.html | 7 +++--
starter/04-CSS-Layouts/style.css | 45 ++++++++++++++++++++++++++++++-
2 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/starter/04-CSS-Layouts/index.html b/starter/04-CSS-Layouts/index.html
index 15ecbeb77..a30c477b1 100644
--- a/starter/04-CSS-Layouts/index.html
+++ b/starter/04-CSS-Layouts/index.html
@@ -18,7 +18,7 @@ The Basic Language of the Web: HTML
-->
-
+
📘 The Code Magazine
@@ -28,6 +28,8 @@ 📘 The Code Magazine
Flexbox
CSS Grid
+
+
@@ -37,11 +39,12 @@ The Basic Language of the Web: HTML
-
+
Posted by Laura Jones on Monday, June 21st 2027
diff --git a/starter/04-CSS-Layouts/style.css b/starter/04-CSS-Layouts/style.css
index c879e79d2..bba322d79 100644
--- a/starter/04-CSS-Layouts/style.css
+++ b/starter/04-CSS-Layouts/style.css
@@ -14,7 +14,7 @@ body {
}
.container {
- width: 800px;
+ width: 1200px;
/* margin-left: auto;
margin-right: auto; */
margin: 0 auto;
@@ -265,3 +265,46 @@ footer p {
nav p {
font-size: 18px;
} */
+
+.author {
+ float: left;
+ margin-left: 20px;
+ margin-top: 10px;
+}
+
+.author-image {
+ float: left;
+ margin-bottom: 20px;
+}
+
+h1 {
+ float: left;
+}
+
+nav {
+ float: right;
+}
+
+.clear {
+ clear: both;
+}
+
+.clearfix::after {
+ clear: both;
+ content: '';
+ display: block;
+}
+
+article {
+ float: left;
+ width: 825px;
+}
+
+aside {
+ float: right;
+ width: 300px;
+}
+
+footer {
+ clear: both;
+}
From 697a5592ea105132166346c3b64e9a7b9e47c3bb Mon Sep 17 00:00:00 2001
From: owen-webb
Date: Tue, 30 Aug 2022 07:50:04 -0600
Subject: [PATCH 02/11] section-4: Apply border-box sizing.
---
starter/04-CSS-Layouts/style.css | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/starter/04-CSS-Layouts/style.css b/starter/04-CSS-Layouts/style.css
index bba322d79..1be385212 100644
--- a/starter/04-CSS-Layouts/style.css
+++ b/starter/04-CSS-Layouts/style.css
@@ -1,5 +1,6 @@
* {
/* border-top: 10px solid #1098ad; */
+ box-sizing: border-box;
margin: 0;
padding: 0;
}
@@ -48,10 +49,7 @@ aside {
background-color: #f7f7f7;
border-top: 5px solid #1098ad;
border-bottom: 5px solid #1098ad;
- /* padding-top: 50px;
- padding-bottom: 50px; */
padding: 50px 0;
- width: 500px;
}
/* SMALLER ELEMENTS */
@@ -80,6 +78,7 @@ h3 {
h4 {
font-size: 20px;
+ margin-bottom: 30px;
text-transform: uppercase;
text-align: center;
}
@@ -134,6 +133,7 @@ li:last-child {
.related {
list-style: none;
+ margin-left: 0;
}
body {
From bb5cb4cedc735079c46ee0bfe9f5df5d56bc7ad2 Mon Sep 17 00:00:00 2001
From: owen-webb
Date: Tue, 30 Aug 2022 07:58:19 -0600
Subject: [PATCH 03/11] section-4: Initialize challenge.
---
starter/04-CSS-Layouts/challenge/index.html | 53 +++++++
starter/04-CSS-Layouts/challenge/style.css | 161 ++++++++++++++++++++
2 files changed, 214 insertions(+)
create mode 100644 starter/04-CSS-Layouts/challenge/index.html
create mode 100644 starter/04-CSS-Layouts/challenge/style.css
diff --git a/starter/04-CSS-Layouts/challenge/index.html b/starter/04-CSS-Layouts/challenge/index.html
new file mode 100644
index 000000000..74b6d8134
--- /dev/null
+++ b/starter/04-CSS-Layouts/challenge/index.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+ Converse Chuck Taylor All Star Low Top
+
+
+
+
$65.00
+
Free shipping
+
Sale
+
+
+ Ready to dress up or down, these classic canvas Chucks are an everyday
+ wardrobe staple.
+
+
More information →
+
+
+
+
+
+
Product details
+
+ Lightweight, durable canvas sneaker
+ Lightly padded footbed for added comfort
+ Iconic Chuck Taylor ankle patch.
+
+
+
+ Add to cart
+
+
+
diff --git a/starter/04-CSS-Layouts/challenge/style.css b/starter/04-CSS-Layouts/challenge/style.css
new file mode 100644
index 000000000..1bd47df6f
--- /dev/null
+++ b/starter/04-CSS-Layouts/challenge/style.css
@@ -0,0 +1,161 @@
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: sans-serif;
+ line-height: 1.4;
+}
+
+.clearfix::after {
+ content: '';
+ display: block;
+ clear: both;
+}
+
+.container {
+/* background-color: red; */
+}
+
+.product-img {
+ float: left;
+ margin-right: 40px;
+}
+
+/* PRODUCT */
+.product {
+ border: 4px solid black;
+ width: 825px;
+ margin: 50px auto;
+ position: relative;
+}
+
+.product-title {
+ text-align: center;
+ font-size: 22px;
+ text-transform: uppercase;
+ background-color: #f7f7f7;
+ padding: 15px;
+}
+
+/* PRODUCT INFORMATION */
+.product-info {
+/* (825 - 8 - 250 - 80) / 2 */
+ width: 243px;
+ float: left;
+ margin-right: 40px;
+ margin-top: 20px;
+}
+
+.price {
+ font-size: 24px;
+ float: left;
+}
+
+.shipping {
+ font-size: 12px;
+ text-transform: uppercase;
+ font-weight: bold;
+ color: #777;
+ margin-bottom: 20px;
+ float: right;
+ margin-top: 8px;
+}
+
+.sale {
+ background-color: #ec2f2f;
+ color: #fff;
+ font-size: 12px;
+ text-transform: uppercase;
+ font-weight: bold;
+ letter-spacing: 2px;
+ padding: 7px 15px;
+ display: inline-block;
+ position: absolute;
+ top: -17px;
+ left: -38px;
+
+/* width: 40px;
+ text-align: center; */
+}
+
+.product-description {
+ clear: both;
+ margin-bottom: 10px;
+}
+
+.more-info:link, .more-info:visited {
+ color: black;
+ margin-bottom: 30px;
+ display: inline-block;
+}
+
+.more-info:hover, .more-info:active {
+ text-decoration: none;
+}
+
+.color {
+ background-color: #000;
+ height: 22px;
+ width: 22px;
+ display: inline-block;
+ margin-right: 10px;
+}
+
+.color-blue {
+ background-color: #2f6ee2;
+}
+.color-red {
+ background-color: #ec2f2f;
+}
+.color-yellow {
+ background-color: #f0bf1e;
+}
+.color-green {
+ background-color: #90cc20;
+}
+.color-brown {
+ background-color: #885214;
+}
+
+/* PRODUCT DETAILS */
+.product-details {
+ width: 243px;
+ float: left;
+ margin-top: 20px;
+}
+
+.details-title {
+ text-transform: uppercase;
+ font-size: 16px;
+ margin-bottom: 15px;
+}
+
+.details-list {
+ list-style: square;
+ margin-left: 20px;
+}
+
+.details-list li {
+ margin-bottom: 10px;
+}
+
+/* BUTTON */
+.add-cart {
+ background-color: #000;
+ border: none;
+ color: #fff;
+ font-size: 20px;
+ text-transform: uppercase;
+ cursor: pointer;
+ padding: 15px;
+ width: 100%;
+ border-top: 4px solid black;
+}
+
+.add-cart:hover {
+ color: #000;
+ background-color: #fff;
+}
From 9bf4bb97a6df7490bd75f902f5fb52b5507edf29 Mon Sep 17 00:00:00 2001
From: owen-webb
Date: Tue, 30 Aug 2022 08:09:18 -0600
Subject: [PATCH 04/11] section-4: Set nav bar links.
---
starter/04-CSS-Layouts/index.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/starter/04-CSS-Layouts/index.html b/starter/04-CSS-Layouts/index.html
index a30c477b1..9f1bd0adb 100644
--- a/starter/04-CSS-Layouts/index.html
+++ b/starter/04-CSS-Layouts/index.html
@@ -25,8 +25,8 @@ 📘 The Code Magazine
Blog
Challenges
- Flexbox
- CSS Grid
+ Flexbox
+ CSS Grid
From 99121e3218ea4bc5ae0a11a4715741bce7cd0d4f Mon Sep 17 00:00:00 2001
From: owen-webb
Date: Tue, 30 Aug 2022 08:47:42 -0600
Subject: [PATCH 05/11] section-4: Flexbox sandbox.
---
starter/04-CSS-Layouts/flexbox.html | 34 ++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)
diff --git a/starter/04-CSS-Layouts/flexbox.html b/starter/04-CSS-Layouts/flexbox.html
index 496ef372a..4cc94248c 100644
--- a/starter/04-CSS-Layouts/flexbox.html
+++ b/starter/04-CSS-Layouts/flexbox.html
@@ -36,10 +36,42 @@
/* STARTER */
font-family: sans-serif;
background-color: #ddd;
- font-size: 40px;
+ font-size: 32px;
margin: 40px;
/* FLEXBOX */
+ align-items: center;
+ display: flex;
+ gap: 10px;
+ justify-content: flex-start;
+ }
+
+ .el {
+
+ /* DEFAULTS:
+ flex-grow: 0;
+ flex-shrink: 1;
+ flex-basis: auto; */
+
+ /* flex-basis: 200px; */
+ /* flex-shrink: 0; */
+ /* flex-grow: 1; */
+ flex: 1;
+ }
+
+ .el--1 {
+ align-self: flex-start;
+ /* order: 2; */
+ /* flex-grow: 3; */
+ }
+
+ .el--5 {
+ align-self: stretch;
+ order: 1;
+ }
+
+ .el--6 {
+ order: -1;
}
From 67a5f15eedbc9b1600c0d80a28ddbdbd0e951db6 Mon Sep 17 00:00:00 2001
From: owen-webb
Date: Tue, 30 Aug 2022 09:04:48 -0600
Subject: [PATCH 06/11] section-4: Style inner components with flexbox.
---
starter/04-CSS-Layouts/index.html | 36 ++++++++++++++----------
starter/04-CSS-Layouts/style.css | 46 +++++++++++++++++++++++++++++--
2 files changed, 66 insertions(+), 16 deletions(-)
diff --git a/starter/04-CSS-Layouts/index.html b/starter/04-CSS-Layouts/index.html
index 9f1bd0adb..10736878e 100644
--- a/starter/04-CSS-Layouts/index.html
+++ b/starter/04-CSS-Layouts/index.html
@@ -36,17 +36,19 @@ 📘 The Code Magazine
-
-
-
-
- All modern websites and web applications are built using three
- fundamental
- technologies: HTML, CSS and JavaScript. These are the languages of the
- web.
-
-
-
- In this post, let's focus on HTML. We will learn what HTML is all
- about, and why you too should learn it.
-
-
- What is HTML?
-
- HTML stands for H yperT ext
- M arkup L anguage. It's a markup
- language that web developers use to structure and describe the content
- of a webpage (not a programming language).
-
-
- HTML consists of elements that describe different types of content:
- paragraphs, links, headings, images, video, etc. Web browsers
- understand HTML and render HTML code as websites.
-
- In HTML, each element is made up of 3 parts:
-
-
- The opening tag
- The closing tag
- The actual element
-
-
-
- You can learn more at
- MDN Web Docs .
-
-
- Why should you learn HTML?
-
-
- There are countless reasons for learning the fundamental language of
- the web. Here are 5 of them:
-
-
-
-
- To be able to use the fundamental web dev language
-
-
- To hand-craft beautiful websites instead of relying on tools like
- Worpress or Wix
-
- To build web applications
- To impress friends
- To have fun 😃
-
-
- Hopefully you learned something new here. See you next time!
-
-
-