You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use flexbox rules to create this very common webpage header style. The benefit to using flex here is that everything should be _flexible_. Check out the two screenshots below to get an idea for how it should scale with your screen. Besides flex rules, you'll also want to add some rules for margin and padding. (hint: `ul`s have some default margin/padding that you will need to deal with)
3
+
Use flexbox rules to create this very common webpage header style. The benefit to using flex here is that everything should be _flexible_. Check out the two screenshots below to get an idea of how it should scale with your screen. Besides flex rules, you'll also want to add some rules for margin and padding. (Hint: `ul`s have some default margin/padding that you will need to deal with.)
4
4
5
5
## Desired Outcome
6
6
@@ -11,8 +11,8 @@ wide:
11
11

12
12
13
13
### Self Check
14
-
- There is space between all items and the edge of the header (specific px amount doesn't matter here)
14
+
- There is space between all items and the edge of the header (specific px amount doesn't matter here).
15
15
- Logo is centered vertically and horizontally.
16
-
- list-items are horizontal, and are centered vertically inside the header
16
+
- list-items are horizontal, and are centered vertically inside the header.
17
17
- left-links and right-links are pushed all the way to the left and right, and stay at the edge of the header when the page is resized.
18
-
-This exercise does not use floats, inline-block, or absolute positioning.
18
+
-Your solution does not use floats, inline-block, or absolute positioning.
Copy file name to clipboardExpand all lines: flex/03-flex-header-2/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Another common header style
2
2
3
-
We're starting to sneak in a little more CSS that you haven't seen yet. Don't worry about this for now, we just want things to look a little bit prettier, and these things do not interfere with your task.
3
+
We're starting to sneak in a little more CSS that you haven't seen yet. Don't worry about this for now; we just want things to look a little bit prettier, and this CSS will not interfere with your task.
4
4
5
5
For this one you will probably need to edit the HTML a little bit. Often with flexbox you need to add containers around things to make them go where you need them to go. In this case, you probably want to separate the items that go on the left and right of the header.
6
6
@@ -18,4 +18,4 @@ As with the last example, this one needs to be flexible in the middle, with item
18
18
- There is 8px space between everything and the edge of the header.
19
19
- Items are arranged horizontally as seen in the outcome image.
20
20
- There is 16px between each item on both sides of the header.
This exercise is to recreate a section that is found on many informational websites.
3
+
The goal of this exercise is to recreate a section that is found on many informational websites.
4
4
5
5
For this one you will need to edit the HTML a little bit too. We can't be making things _too_ easy for you. You'll want to add containers around the various elements so that you can flex them. Good luck!
6
6
@@ -10,10 +10,10 @@ For this one you will need to edit the HTML a little bit too. We can't be making
10
10
11
11
### Self Check
12
12
13
-
- All items are centered on the page (horizontally, not vertically)
14
-
-Title is centered on the page
15
-
- 32px between the title and the 'items'
16
-
- 52px between each item
17
-
-Items are arranged horizontally on the page
18
-
-Items are only 200px wide and the text wraps
19
-
-Item text is centered
13
+
- All items are centered on the page (horizontally, not vertically).
14
+
-The title is centered on the page.
15
+
-There is 32px between the title and the 'items.'
16
+
-There is 52px between each item.
17
+
-The items are arranged horizontally on the page.
18
+
-The items are only 200px wide and the text wraps.
Copy file name to clipboardExpand all lines: flex/05-flex-modal/README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
This one is another very common pattern on the web. The solution to this one is _simple_... but it might not be immediately obvious to you. You'll need to edit the HTML a bit to get everything where it needs to be.
3
3
4
4
### a hint
5
-
Depending on how to approach this one, you might need to revisit the `flex-shrink` property to keep a flex item from getting smashed.
5
+
Depending on how you approach this one, you might need to revisit the `flex-shrink` property to keep a flex item from getting smashed.
6
6
7
7
## Desired outcome
8
8
@@ -11,7 +11,7 @@ Depending on how to approach this one, you might need to revisit the `flex-shrin
11
11
### Self Check
12
12
13
13
- The blue icon is aligned to the left.
14
-
- There is equal space on either side of the icon (the gap between the icon and the edge of the card, and the icon and the text is the same).
14
+
- There is equal space on either side of the icon (the gaps between the icon and the edge of the card, and the icon and the text, are the same).
15
15
- There is padding around the edge of the modal.
16
16
- The header, text, and buttons are aligned with each other.
17
17
- The header is bold and a slightly larger text-size than the text.
Copy file name to clipboardExpand all lines: flex/06-flex-layout/README.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -3,19 +3,19 @@
3
3
Flexbox is useful for laying out entire pages as well as the smaller components we've already been working with. For this exercise, we're leaving you with a little more work to do, with some things you may not have encountered yet. It's perfectly acceptable to google things you're unsure of!
4
4
5
5
### Hints
6
-
-you may want to search something like `CSS remove list bullets`. We've done this for you in previous examples, but not here. Yay learning.
7
-
- We've added `height: 100vh` to the `body`.. this makes the body exactly the same height as the viewport. To stick the footer to the bottom you will need to use flex and change the direction to column.
6
+
-You may want to search something like `CSS remove list bullets`. We've done this for you in previous examples, but not here. Yay learning.
7
+
- We've added `height: 100vh` to the `body`... this makes the body exactly the same height as the viewport. To stick the footer to the bottom you will need to use flex and change the direction to column.
8
8
9
9
## Desired Outcome
10
10

11
11
12
12
### Self Check
13
13
14
-
-Header is at the top of the page, footer is at the bottom and they stay in place if you resize your screen.
15
-
-Header and footer have padding.
16
-
-Links in header and footer are pushed to either side.
14
+
-The header is at the top of the page, the footer is at the bottom, and they stay in place if you resize your screen.
15
+
-The header and footer have padding.
16
+
-The links in the header and footer are pushed to either side.
17
17
- There is space between the links in the header and footer.
18
-
-Footer has a light gray background (`#eeeeee`).
19
-
-Logo, input and buttons are centered in the screen.
20
-
-Buttons have an appropriate amount of padding.
18
+
-The footer has a light gray background (`#eeeeee`).
19
+
-The logo, input and buttons are centered in the screen.
20
+
-The buttons have an appropriate amount of padding.
21
21
- There is space between the logo, input and buttons.
In this last flexbox exercise you're going to recreate an incredibly common website layout. It is so common that it is often called the [holy-grail](https://www.google.com/search?q=holy+grail+layout&tbm=isch&sclient=img) layout.... and with flexbox it is actually pretty easy to pull off.
3
+
In this last flexbox exercise you're going to recreate an incredibly common website layout. It is so common that it is often called the [Holy Grail](https://www.google.com/search?q=holy+grail+layout&tbm=isch&sclient=img) layout... and with flexbox it is actually pretty easy to pull off.
4
4
5
5
As with the previous exercise, we've left a little more for you to do.
6
6
@@ -13,20 +13,20 @@ As with the previous exercise, we've left a little more for you to do.
13
13
14
14

15
15
16
-
The number of cards lined up in that section will change based on the width of your screen, so don't stress about getting _exactly_ a 3x3 grid.
16
+
The number of cards lined up in that section will change based on the width of your screen, so don't stress about getting _exactly_ a 2x3 or 3x2 grid.
17
17
18
-
on a smaller screen it will look like this:
18
+
On a smaller screen it will look like this:
19
19
20
20

21
21
22
22
### Self Check
23
-
-Header text is size 32px, weight 900
24
-
-Header text is vertically centered and 16px from the edge of the screen.
25
-
-Footer is pushed to bottom of screen (footer may go _below_ the bottom of the screen if the content of the 'cards' section overflows and/or if your screen is shorter)
26
-
-Footer text is centered horizontally and vertically.
27
-
-Sidebar and cards take up all available space above the footer.
28
-
-Sidebar is 300px wide (i.e. it doesn't shrink)
29
-
-Sidebar links are size 24px, white and do not have the underline text decoration.
30
-
-Sidebar has 16px padding.
31
-
- There is 32px padding around the 'cards' section
32
-
-Cards are arranged horizontally, but wrap to multiple lines when they run out of room on the page
23
+
-The header text is size 32px and weight 900.
24
+
-The header text is vertically centered and 16px from the edge of the screen.
25
+
-The footer is pushed to the bottom of the screen (the footer may go _below_ the bottom of the screen if the content of the 'cards' section overflows and/or if your screen is shorter).
26
+
-The footer text is centered horizontally and vertically.
27
+
-The sidebar and cards take up all available space above the footer.
28
+
-The sidebar is 300px wide (and it doesn't shrink).
29
+
-The sidebar links are size 24px, are white, and do not have the underline text decoration.
30
+
-The sidebar has 16px padding.
31
+
- There is 32px padding around the 'cards' section.
32
+
-The cards are arranged horizontally, but wrap to multiple lines when they run out of room on the page.
0 commit comments