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
Copy file name to clipboardExpand all lines: README.md
+12-73Lines changed: 12 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,20 +9,13 @@
9
9
We use the Slack app almost every day to keep our communications with our classmates and the **Ironhack** team, but today we will be focusing on their landing page. In today's lab, we'll recreate Slack's landing page while ensuring it's responsive and adapts well to different screens. You can see the web page that we will be cloning [here](https://www.figma.com/proto/k77VYVA70WcPYRLvg4QmIf/LAB-CSS-Slack-Clone?node-id=125%3A3&scaling=scale-down-width&page-id=125%3A2&starting-point-node-id=125%3A3&hide-ui=1).
10
10
11
11
12
-
13
12
The goal of the lab is to create a *responsive* landing page using **CSS** and **Flexbox**.
14
13
15
-
16
-
17
-
18
14
## Requirements
19
15
20
16
- Fork this repo
21
-
22
17
- Clone this repo
23
18
24
-
25
-
26
19
## Submission
27
20
28
21
- Upon completion, run the following commands:
@@ -41,12 +34,8 @@ The goal of the lab is to create a *responsive* landing page using **CSS** and *
41
34
42
35
The `starter_code` folder contains all the files you'll need. The `images` folder contains all the images you'll need for your page, although most of them are already displayed on the page.
43
36
44
-
45
-
46
37
**The `index.html` already contains all the text and content needed. We will be focusing on the CSS and styling!**
47
38
48
-
49
-
50
39
During each iteration, the first step you should do is to inspect the provided screenshots. These are included in each iteration, along with a preview of the final result. Use these as a starting point for implementing your styles.
51
40
52
41
<br />
@@ -59,7 +48,7 @@ The first step during every iteration will be to inspect the design files. These
59
48
60
49
Figma is great because it allows designers and developers to collaborate on projects while also making it simple to share and preview web page designs.
61
50
62
-
When you begin working as a developer, your team will likely use Figma to hand off to you the designs of the features you will be asked to create. We're going to assume you've never seen Figma before, so don't worry. The following short videos should get you up to speed:
51
+
When you begin working as a developer, your team will likely use Figma to hand off to you the designs of the features you will be asked to create. We're going to assume you've never seen Figma before, so don't worry. The following short videos should get you up to speed:
63
52
64
53
- [What is Figma?](https://www.youtube.com/watch?v=_d8GG2QZYAM)
65
54
- [Figma for Frontend developers [ in 5 minutes ]](https://www.youtube.com/watch?v=hbN9RGcQFNU)
@@ -80,8 +69,6 @@ We will start by focusing on the styles for mobile screens first! :iphone: Oh! R
80
69
81
70
When done, your page should look like this: [Preview - Mobile](https://www.figma.com/proto/k77VYVA70WcPYRLvg4QmIf/LAB-CSS-Slack-Clone?node-id=68%3A2762&scaling=scale-down&page-id=68%3A2761&starting-point-node-id=68%3A2762&show-proto-sidebar=1&hide-ui=1)
82
71
83
-
84
-
85
72
<br>
86
73
87
74
Use the following page screenshot as the guide:
@@ -96,9 +83,6 @@ Use the following page screenshot as the guide:
96
83
</details>
97
84
98
85
99
-
100
-
101
-
102
86
<!--
103
87
104
88
You can inspect the page styles here:
@@ -121,23 +105,16 @@ You can inspect the page styles here:
121
105
### Iteration 2 | Small Screens (width > 768px and width < 1024px)
122
106
123
107
Let's start growing our screen size. In this iteration, you will work on making the website look great on small screens (iPads, tablets, or larger smartphones). You will have to use CSS [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) to apply the style and layout changes. Take a look at the preview and the screenshot to see the changes that are needed. Your task is to work on the following:
124
-
125
-
126
-
127
108
- The **header** should go from 1 column to display 2 columns: one with the content and buttons, and the other with the image.
128
109
- The **company logos** should be displayed in a single row.
129
110
- The **images** in the sections in the **main** part should be fully displayed and aligned to the left or right side of the page, respectively.
130
111
- The **section "Teams large and small rely on Slack"** should have the list items and the buttons displayed horizontally as rows.
131
112
- The **sub-footer** items, previously displayed as a column, should now be displayed in a single row.
132
113
133
-
134
-
135
114
<br>
136
115
137
116
When done, your page should look like this: [Preview - Small Screens](https://www.figma.com/proto/k77VYVA70WcPYRLvg4QmIf/LAB-CSS-Slack-Clone?node-id=49%3A1508&scaling=scale-down&page-id=68%3A2976&starting-point-node-id=49%3A1508&hide-ui=1)
138
117
139
-
140
-
141
118
<br>
142
119
143
120
Use the following page screenshot as the guide:
@@ -162,35 +139,22 @@ You can inspect the page styles here:
162
139
-->
163
140
164
141
165
-
166
-
167
-
168
142
<br>
169
143
170
-
171
-
172
144
----
173
145
174
146
175
-
176
147
### Iteration 3 | Medium Screens (width > 1024px and width < 1440px)
177
148
178
-
We'll continue by focusing on devices with medium-sized screens (notebooks and bigger tablets). Similar to the previous iteration, you will have to use CSS media queries to apply the style and layout changes. The most noticeable changes for this viewport size are:
179
-
180
-
181
-
149
+
We'll continue by focusing on devices with medium-sized screens (notebooks and bigger tablets). Similar to the previous iteration, you will have to use CSS media queries to apply the style and layout changes. The most noticeable changes in this viewport size are:
182
150
- The **navbar** should now display all the menu links. The previously displayed menu icon should now be hidden.
183
151
- The **sections** in the **main** part should now display the content in 2 columns: one column for the heading and text, and the other for the image.
184
152
- The **section "Welcome to your new digital HQ"** should now have the buttons displayed horizontally as rows.
185
153
186
-
187
-
188
154
<br>
189
155
190
156
When done, your page should look like this: [Preview - Medium Screens](https://www.figma.com/proto/k77VYVA70WcPYRLvg4QmIf/LAB-CSS-Slack-Clone?node-id=49%3A2159&scaling=scale-down&page-id=68%3A2977&starting-point-node-id=49%3A2159&hide-ui=1)
191
157
192
-
193
-
194
158
<br>
195
159
196
160
Use the following page screenshot as the guide:
@@ -200,8 +164,6 @@ Use the following page screenshot as the guide:
[Back to top](#iteration-3--medium-screens-width--1024px-and-width--1440px)
206
168
</details>
207
169
@@ -229,21 +191,13 @@ You can inspect the page styles here:
229
191
### BONUS: Iteration 4 | Large Screens (width > 1440px)
230
192
231
193
Last one! Some small changes and we are done! In this iteration we are targeting large-screen devices such as desktops and laptops:
232
-
233
-
234
-
235
194
- The **signup buttons** in the **header** should now be displayed horizontally, next to each other.
236
-
237
195
- Additionally, the image shown in the **header** should be centered and fully visible.
238
196
239
-
240
-
241
197
<br>
242
198
243
199
When done, your page should look like this: [Preview - Large Screens](https://www.figma.com/proto/k77VYVA70WcPYRLvg4QmIf/LAB-CSS-Slack-Clone?node-id=49%3A2489&scaling=scale-down&page-id=68%3A2978&starting-point-node-id=49%3A2489&hide-ui=1)
244
200
245
-
246
-
247
201
<br>
248
202
249
203
Use the following page screenshot as the guide:
@@ -253,9 +207,6 @@ Use the following page screenshot as the guide:
[Back to top](#iteration-4--large-screens-width--1440px)
260
211
261
212
</details>
@@ -268,19 +219,17 @@ You can inspect the page styles here: [Figma file - Large Screens]()
268
219
269
220
-->
270
221
271
-
272
-
273
222
<br />
274
223
275
224
276
225
277
-
Happy coding! ❤️
278
-
226
+
Happy coding! :heart:
279
227
228
+
<br>
280
229
281
230
## FAQs
282
231
283
-
232
+
<br>
284
233
285
234
<details>
286
235
<summary>I am stuck in the exercise and don't know how to solve the problem or where to start.</summary>
@@ -289,10 +238,10 @@ Happy coding! ❤️
289
238
If you are stuck in your code and don't know how to solve the problem or where to start, you should take a step back and try to form a clear question about the specific issue you are facing. This will help you narrow down the problem and come up with potential solutions.
290
239
291
240
292
-
For example, is it a concept that you don't understand, or are you receiving an error message that you don't know how to fix? It is usually helpful to try to state the problem as clearly as possible, including any error messages you are receiving. This can help you communicate the issue to others and potentially get help from classmates or online resources.
241
+
For example, is it a concept that you don't understand, or are you receiving an error message that you don't know how to fix? It is usually helpful to try to state the problem as clearly as possible, including any error messages you are receiving. This can help you communicate the issue to others and potentially get help from classmates or online resources.
293
242
294
243
295
-
Once you have a clear understanding of the problem, you will be able to start working towards the solution.
244
+
Once you have a clear understanding of the problem, you will be able to start working toward the solution.
296
245
297
246
[Back to top](#faqs)
298
247
</details>
@@ -369,18 +318,16 @@ div {
369
318
}
370
319
```
371
320
372
-
This will set the `widh` property of the `div` to 500 pixels and we set the left and right margin to be equal by using `margin: 0 auto;`.
321
+
This will set the `width` property of the `div` to 500 pixels and we set the left and right margins to be equal by using `margin: 0 auto;`.
373
322
374
323
[Back to top](#faqs)
375
324
</details>
376
325
377
-
378
-
379
326
<details>
380
327
<summary>How do I center align an HTML image element?</summary>
381
328
<br>
382
329
383
-
There are a few ways you can center aling an image element.
330
+
There are a few ways you can center align an image element.
384
331
385
332
##### 1. Align an image using `text-align`
386
333
@@ -452,8 +399,6 @@ header {
452
399
}
453
400
```
454
401
455
-
456
-
457
402
To make the header responsive and change it to a two column layout on screens that are wider than 800 pixels, use a media query and set the `flex-direction` property to `row`:
458
403
459
404
```css
@@ -469,15 +414,11 @@ To make the header responsive and change it to a two column layout on screens th
469
414
}
470
415
```
471
416
472
-
473
-
474
417
On smaller screens, the header will maintain a single column layout, but on screens larger than 800 pixels wide, it will change to a two column layout.
475
418
476
419
[Back to top](#faqs)
477
420
</details>
478
421
479
-
480
-
481
422
<details>
482
423
<summary>Why are my media query styles not displaying properly on my browser?</summary>
483
424
<br>
@@ -486,16 +427,14 @@ On smaller screens, the header will maintain a single column layout, but on scre
486
427
487
428
488
429
489
-
There are a few possible reasons why your media query styles may not be displaying properly on your browser
430
+
There are a few possible reasons why your media query styles may not be properly displayed on your browser.
490
431
491
432
1. Check that you already have default styles for mobile screens, where applicable. These styles should be placed at the beginning of your stylesheet, before your media queries.
492
-
2. Make sure that you have placed your media queries at the end of your stylesheet, after your regular styles. This is because media queries are applied after regular styles, so if you place them before your regular styles, they will be overridden.
433
+
2. Make sure you have placed your media queries at the end of your stylesheet after your regular styles. This is because media queries are applied after regular styles, so if you place them before your regular styles, they will be overridden.
493
434
3. Make sure that you have the correct syntax in your media query. The correct syntax is `@media (expression) {...}`.
494
435
4. Make sure that you are using the correct media query expression. For example, if you are trying to target screens that are wider than 800 pixels, you should use the `min-width` in your expression, like this: `@media (min-width: 800px) {...}.`
495
436
496
-
497
-
498
-
For more information on CSS media queries, check: [MDN: Beginner's guide to media queries](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Media_queries)
437
+
For more information on CSS media queries, check: [MDN: Beginner's guide to media queries](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Media_queries)
0 commit comments