Skip to content

Commit

Permalink
Added lesson 14
Browse files Browse the repository at this point in the history
  • Loading branch information
gitdagray committed May 3, 2022
1 parent f91ec80 commit 4a2cf74
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 0 deletions.
46 changes: 46 additions & 0 deletions 14_lesson/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: "Roboto", sans-serif;
min-height: 100vh;
padding: 20px;
}

.container {
max-width: 800px;
min-height: 400px;
margin-inline: auto;
border: 1px solid #000;
display: flex;
gap: 1rem;
justify-content: center;
align-items: center;
flex-flow: row wrap;
align-content: space-evenly;
}

.box {
/* min-width: 100px; */
height: 100px;
background-color: #000;
color: #fff;
font-size: 2rem;
padding: 0.5rem;

display: flex;
justify-content: center;
align-items: center;

flex: 1 1 150px;
}

.box:nth-child(2) {
flex: 2 2 150px;
order: 1;
}
23 changes: 23 additions & 0 deletions 14_lesson/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Flexbox</title>
<link rel="stylesheet" href="css/style.css">
</head>

<body>
<main class="container">
<div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
<div class="box">5</div>
<div class="box">6</div>
</main>
</body>

</html>
29 changes: 29 additions & 0 deletions 14_lesson_starter/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: "Roboto", sans-serif;
min-height: 100vh;
padding: 20px;
}

.container {
max-width: 800px;
min-height: 400px;
margin-inline: auto;
border: 1px solid #000;
}

.box {
min-width: 100px;
min-height: 100px;
background-color: #000;
color: #fff;
font-size: 2rem;
padding: 0.5rem;
}
23 changes: 23 additions & 0 deletions 14_lesson_starter/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Flexbox</title>
<link rel="stylesheet" href="css/style.css">
</head>

<body>
<main class="container">
<div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
<div class="box">5</div>
<div class="box">6</div>
</main>
</body>

</html>
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
- πŸ”— [MDN: Basic Concepts of MultiCol](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Columns/Basic_Concepts_of_Multicol)
- πŸ”— [MDN: Margin Collapsing](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing)
- πŸ”— [MDN: Position](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning)
- πŸ”— [MDN: Flexbox](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox)

### πŸ“š Typography Resources:
- πŸ”— [MDN: Fundamental Text and Font Styling](https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text/Fundamentals)
Expand Down Expand Up @@ -110,5 +111,7 @@
- πŸ”— [Chapter 12 Starter Code](https://github.com/gitdagray/css_course/tree/main/12_lesson_starter)
- πŸ”— [Chapter 13 Starter Code](https://github.com/gitdagray/css_course/tree/main/13_lesson_starter)
- πŸ”— [Chapter 13 Completed Code](https://github.com/gitdagray/css_course/tree/main/13_lesson)
- πŸ”— [Chapter 14 Starter Code](https://github.com/gitdagray/css_course/tree/main/14_lesson_starter)
- πŸ”— [Chapter 14 Completed Code](https://github.com/gitdagray/css_course/tree/main/14_lesson)


0 comments on commit 4a2cf74

Please sign in to comment.