All language subtitles for 114 Building the How-It-Works Section - Part 2.en_US

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian Download
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,850 --> 00:00:04,860 All right. Let's now keep on working 2 00:00:04,860 --> 00:00:07,203 on our how it works section. 3 00:00:08,790 --> 00:00:09,920 And we're gonna start 4 00:00:09,920 --> 00:00:12,843 with these three text elements, right here. 5 00:00:14,520 --> 00:00:15,700 All right. 6 00:00:15,700 --> 00:00:19,173 So that is the step number, 7 00:00:20,250 --> 00:00:23,603 and the heading here, and the step description. 8 00:00:24,710 --> 00:00:26,193 So let's go down here, 9 00:00:31,460 --> 00:00:33,443 and starting with this one. 10 00:00:35,750 --> 00:00:38,570 So, if you remember the design example 11 00:00:38,570 --> 00:00:40,070 that we started with here, 12 00:00:40,960 --> 00:00:44,070 remember that this text was really large, 13 00:00:44,070 --> 00:00:47,390 so let's select a huge font size here. 14 00:00:47,390 --> 00:00:50,043 So like 86 or 98. 15 00:00:51,210 --> 00:00:54,093 So I'm gonna start with 98 here maybe even. 16 00:00:57,040 --> 00:01:00,093 So 9.8 rem. 17 00:01:02,210 --> 00:01:05,210 Let's also make it quite bold, 18 00:01:05,210 --> 00:01:07,550 but since the text is so huge, 19 00:01:07,550 --> 00:01:09,420 let's not go with 700, 20 00:01:09,420 --> 00:01:11,363 but with 600 maybe, 21 00:01:12,610 --> 00:01:13,883 and now the color. 22 00:01:14,840 --> 00:01:15,900 And here, again, 23 00:01:15,900 --> 00:01:18,660 just like the design example I showed you, 24 00:01:18,660 --> 00:01:23,120 we want a very light color, so a very light gray. 25 00:01:23,120 --> 00:01:25,370 And so let's again go with that approach 26 00:01:25,370 --> 00:01:28,920 of using gray colors that are like this. 27 00:01:28,920 --> 00:01:31,590 So these three values here, all the same, 28 00:01:31,590 --> 00:01:34,090 instead of using some other gray color 29 00:01:34,090 --> 00:01:36,823 from some other color system, okay? 30 00:01:38,010 --> 00:01:42,140 And let me show you how I come up with a color like this. 31 00:01:42,140 --> 00:01:44,280 So here we want it very light, 32 00:01:44,280 --> 00:01:48,820 and so we know that the lightest one is basically white, 33 00:01:48,820 --> 00:01:51,900 so that's F-F-F, right? 34 00:01:51,900 --> 00:01:55,350 And going down from F-F-F a little bit darker, 35 00:01:55,350 --> 00:01:59,010 is then E-E-E, okay? 36 00:01:59,010 --> 00:02:02,330 The next one would be C-C-C, B-B-B, A-A-A, 37 00:02:02,330 --> 00:02:03,610 and then nine, nine, 38 00:02:03,610 --> 00:02:05,280 and then eight, seven, six, 39 00:02:05,280 --> 00:02:07,370 five, all the way to zero, 40 00:02:07,370 --> 00:02:08,883 which is complete black. 41 00:02:10,683 --> 00:02:11,670 So let's just try this, 42 00:02:11,670 --> 00:02:16,233 even though it's probably going to be way too light. 43 00:02:17,300 --> 00:02:20,083 And indeed it is a little bit too light here. 44 00:02:22,350 --> 00:02:25,960 Probably even a bit too big, maybe. 45 00:02:25,960 --> 00:02:28,070 So let's make it a bit darker 46 00:02:28,070 --> 00:02:31,120 and take it down one step here, 47 00:02:31,120 --> 00:02:35,310 so that's putting it at 8.6 rem, 48 00:02:35,310 --> 00:02:37,393 and then here, the next one is D-D-D. 49 00:02:38,720 --> 00:02:39,853 Let's try that, 50 00:02:40,900 --> 00:02:43,383 and that does look better, I think. 51 00:02:44,330 --> 00:02:47,010 So, of course, in terms of accessibility, 52 00:02:47,010 --> 00:02:50,260 the contrast ratio here is very, very low, 53 00:02:50,260 --> 00:02:52,900 and so it will not pass that. 54 00:02:52,900 --> 00:02:56,530 However, as hopefully you heard at some point, 55 00:02:56,530 --> 00:03:00,170 rules are meant to be broken, right? 56 00:03:00,170 --> 00:03:01,003 So in this case, 57 00:03:01,003 --> 00:03:04,470 we're giving priority here really to the visual style, 58 00:03:04,470 --> 00:03:08,210 which is in fact not very, very important. 59 00:03:08,210 --> 00:03:11,780 I mean, the content here of zero one is not crucial 60 00:03:11,780 --> 00:03:14,610 for the user to understand this design. 61 00:03:14,610 --> 00:03:17,710 And so, many designers use some situations 62 00:03:17,710 --> 00:03:20,730 in which they do break these rules. 63 00:03:20,730 --> 00:03:23,160 So we didn't break it, for example, here. 64 00:03:23,160 --> 00:03:27,090 So I was very careful making the text here accessible, 65 00:03:27,090 --> 00:03:28,410 and here as well, 66 00:03:28,410 --> 00:03:30,640 because this piece of content, I think, 67 00:03:30,640 --> 00:03:32,420 is actually quite important, 68 00:03:32,420 --> 00:03:34,970 and I want everyone to understand it. 69 00:03:34,970 --> 00:03:38,690 But well, here, I think we can break that rule. 70 00:03:38,690 --> 00:03:41,170 And of course, this is all a bit subjective 71 00:03:41,170 --> 00:03:44,670 and you might not want to break any rules at all. 72 00:03:44,670 --> 00:03:46,150 And so then you would have to go 73 00:03:46,150 --> 00:03:49,280 with a lot of a darker color here, 74 00:03:49,280 --> 00:03:51,930 but then it doesn't look visually so nice, 75 00:03:51,930 --> 00:03:54,250 so that's why I went with this one here, 76 00:03:54,250 --> 00:03:57,940 because I really liked that design example that I saw, 77 00:03:57,940 --> 00:03:59,393 that I showed you, right? 78 00:04:01,040 --> 00:04:04,060 Okay, so we just need some spacing here probably, 79 00:04:04,060 --> 00:04:07,593 and then let's start working on this tertiary heading. 80 00:04:08,670 --> 00:04:10,233 So margin to the bottom, 81 00:04:12,600 --> 00:04:13,823 let's say 12, 82 00:04:14,740 --> 00:04:17,090 because there was already some spacing there, 83 00:04:17,090 --> 00:04:19,410 which always comes from the line height. 84 00:04:19,410 --> 00:04:21,260 And when the text is so big, 85 00:04:21,260 --> 00:04:25,040 then there's already a lot of basically default spacing 86 00:04:25,040 --> 00:04:26,093 after the text. 87 00:04:27,270 --> 00:04:28,710 So that looks good. 88 00:04:28,710 --> 00:04:31,223 And now we have the heading tertiary. 89 00:04:32,540 --> 00:04:36,850 And so this file is growing a lot, actually, 90 00:04:36,850 --> 00:04:41,240 and I'm a bit tired of having to scroll up and down here. 91 00:04:41,240 --> 00:04:43,560 And so, what I will do now, 92 00:04:43,560 --> 00:04:45,600 and what I many times do, 93 00:04:45,600 --> 00:04:48,063 is to split it up into two files. 94 00:04:49,090 --> 00:04:51,570 So that is of course, perfectly fine. 95 00:04:51,570 --> 00:04:53,640 It's something that we didn't do yet, 96 00:04:53,640 --> 00:04:57,860 but it's no problem to split our own CSS code 97 00:04:57,860 --> 00:04:59,823 into one or multiple files. 98 00:05:00,700 --> 00:05:03,500 So here, inside of the CSS folder, 99 00:05:03,500 --> 00:05:05,900 I'm gonna create a new file, 100 00:05:05,900 --> 00:05:10,633 and I'm gonna call it the general.CSS. 101 00:05:12,060 --> 00:05:16,550 Okay, and so I will put all of this general code here, 102 00:05:16,550 --> 00:05:19,180 the one that we reuse all the time, 103 00:05:19,180 --> 00:05:24,180 and that includes this design information here. 104 00:05:25,700 --> 00:05:30,173 So I will put all that, here, in general. 105 00:05:32,820 --> 00:05:37,820 Okay, and then the rest simply stays in the style file. 106 00:05:38,790 --> 00:05:42,193 Then of course, we also need to include that here, right? 107 00:05:43,360 --> 00:05:45,113 Otherwise, nothing works. 108 00:05:46,490 --> 00:05:48,623 So here we want a style sheet again, 109 00:05:53,318 --> 00:05:54,368 and now, our general. 110 00:05:56,670 --> 00:05:58,713 Oh, and course I need to close that, 111 00:05:59,960 --> 00:06:01,570 and now it's fixed, 112 00:06:01,570 --> 00:06:05,920 and let's see if it looks the same and it does. 113 00:06:05,920 --> 00:06:08,080 So we're still good here, 114 00:06:08,080 --> 00:06:09,693 spacing also looks okay. 115 00:06:10,590 --> 00:06:14,560 And so let's now style that tertiary heading 116 00:06:14,560 --> 00:06:16,570 that we just added here. 117 00:06:16,570 --> 00:06:17,403 And once again, 118 00:06:17,403 --> 00:06:19,420 let's go with the same font weight color 119 00:06:19,420 --> 00:06:21,210 and letter spacing. 120 00:06:21,210 --> 00:06:24,323 And I'm also adding that to the list here, 121 00:06:27,609 --> 00:06:31,400 and then let's give it another font size. 122 00:06:31,400 --> 00:06:32,983 So one step down, maybe. 123 00:06:34,373 --> 00:06:38,210 So from 4.4, let's go to a 36 124 00:06:38,210 --> 00:06:40,080 or maybe 30. 125 00:06:40,080 --> 00:06:43,143 So we'll see that in a minute, what works best. 126 00:06:49,610 --> 00:06:51,363 So 3.6 rem, 127 00:06:52,740 --> 00:06:55,113 and let's also give it that line height of 1.2. 128 00:06:59,180 --> 00:07:02,560 And let's immediately add some margin to the bottom here, 129 00:07:02,560 --> 00:07:05,300 of 3.2 rem. 130 00:07:05,300 --> 00:07:06,970 And of course, in the real world, 131 00:07:06,970 --> 00:07:10,260 you would have to experiment around with this a lot, 132 00:07:10,260 --> 00:07:13,550 but here we can not take that much time. 133 00:07:13,550 --> 00:07:16,360 And so I will just use these values here, 134 00:07:16,360 --> 00:07:18,150 as I think they make more sense 135 00:07:18,150 --> 00:07:23,073 and not always scroll up and down here in our file. 136 00:07:24,420 --> 00:07:27,120 Well, that's actually the first style, 137 00:07:27,120 --> 00:07:29,180 the paragraph as well, 138 00:07:29,180 --> 00:07:31,970 so that we can see if the visual hierarchy 139 00:07:31,970 --> 00:07:34,573 that we're building here makes sense. 140 00:07:38,790 --> 00:07:42,750 So this one is now, again, specific to the section, 141 00:07:42,750 --> 00:07:45,873 and so it goes into the style.CSS file. 142 00:07:51,623 --> 00:07:55,940 So let's start with maybe two rem, 143 00:07:55,940 --> 00:07:57,790 but that's maybe a bit too much, 144 00:07:57,790 --> 00:08:01,083 and then I will also use the same line height of 1.8. 145 00:08:02,690 --> 00:08:05,230 So what I have here is basically the same text 146 00:08:05,230 --> 00:08:08,763 as we have in the paragraph, right, in the hero. 147 00:08:10,110 --> 00:08:12,933 Or actually here we have 1.6 somehow, 148 00:08:14,608 --> 00:08:17,740 and still the font size of two, 149 00:08:17,740 --> 00:08:19,633 but let's try 1.8. 150 00:08:23,730 --> 00:08:28,343 And while the text is way too large, actually, 151 00:08:29,750 --> 00:08:31,920 so let's tone that down, 152 00:08:31,920 --> 00:08:33,490 and also the image, 153 00:08:33,490 --> 00:08:36,790 it occupies almost the entire viewport here. 154 00:08:36,790 --> 00:08:40,890 Right, so let's take it all down a notch here, 155 00:08:40,890 --> 00:08:44,110 and the image as well. 156 00:08:44,110 --> 00:08:47,900 So it's now 50, let's make it like 30%. 157 00:08:47,900 --> 00:08:52,900 And here going down to 1.8 rem, 158 00:08:54,270 --> 00:08:58,133 and also this one going down to 3.0. 159 00:08:59,140 --> 00:09:01,250 So let's check that out. 160 00:09:01,250 --> 00:09:04,830 And that does look a bit better, right? 161 00:09:04,830 --> 00:09:08,280 Also the spacing of 1.8 looks good. 162 00:09:08,280 --> 00:09:11,633 I think 1.6 would be a little bit too little, 163 00:09:12,560 --> 00:09:16,820 and now just this image here is a little bit too small, 164 00:09:16,820 --> 00:09:18,090 I would say. 165 00:09:18,090 --> 00:09:20,500 Also we want it to be centered, 166 00:09:20,500 --> 00:09:22,573 so let's actually do that first. 167 00:09:23,510 --> 00:09:26,123 So basically let me inspect this here. 168 00:09:27,800 --> 00:09:30,430 So inside of this step image box, 169 00:09:30,430 --> 00:09:33,050 we want the image to be centered vertically 170 00:09:33,050 --> 00:09:34,750 and horizontally. 171 00:09:34,750 --> 00:09:37,810 Well, right now, vertically it's not necessary, 172 00:09:37,810 --> 00:09:40,160 because the content is large enough, 173 00:09:40,160 --> 00:09:43,250 or actually it's not large enough, 174 00:09:43,250 --> 00:09:47,470 so if this was a big, big text here, 175 00:09:47,470 --> 00:09:48,420 let me just... 176 00:09:49,960 --> 00:09:53,940 so we can actually do that here in the inspector. 177 00:09:53,940 --> 00:09:57,200 So I'm just copy and pasting this a couple of times here, 178 00:09:57,200 --> 00:09:58,830 just to show you. 179 00:09:58,830 --> 00:10:01,940 And so now, of course, we would need to center it 180 00:10:01,940 --> 00:10:05,430 both vertically and horizontally, right? 181 00:10:05,430 --> 00:10:07,763 And so let's start by doing that now. 182 00:10:09,270 --> 00:10:11,930 And so this image is right now 183 00:10:11,930 --> 00:10:14,543 inside of this step image box. 184 00:10:16,210 --> 00:10:17,943 We haven't selected that yet. 185 00:10:19,320 --> 00:10:24,320 So let's put that here, before this image. 186 00:10:26,560 --> 00:10:29,880 And so, to easily center the image inside that, 187 00:10:29,880 --> 00:10:31,463 we simply use flexbox. 188 00:10:33,400 --> 00:10:35,960 So just as we have been doing all along, 189 00:10:35,960 --> 00:10:38,263 we use align items center, 190 00:10:39,440 --> 00:10:42,833 and justify content center, as well. 191 00:10:44,960 --> 00:10:46,060 Nice. 192 00:10:46,060 --> 00:10:47,223 And so now it is, 193 00:10:48,250 --> 00:10:52,600 well, now I think it is centered 194 00:10:52,600 --> 00:10:55,603 both horizontally and vertically, yeah, as you see. 195 00:10:57,870 --> 00:11:00,600 So this is without the vertical centering, 196 00:11:00,600 --> 00:11:02,820 and then the image would actually stretch 197 00:11:02,820 --> 00:11:04,530 from top to bottom. 198 00:11:04,530 --> 00:11:07,200 And do you remember why that is? 199 00:11:07,200 --> 00:11:10,490 Well, it's because on flex items, by default, 200 00:11:10,490 --> 00:11:13,033 they are set to align items stretch. 201 00:11:14,783 --> 00:11:17,410 So if we turned that off completely, 202 00:11:17,410 --> 00:11:19,760 then of course it would be no longer stretched. 203 00:11:20,640 --> 00:11:23,360 So then of course it would not be vertically 204 00:11:23,360 --> 00:11:25,373 nor horizontally aligned. 205 00:11:26,780 --> 00:11:28,980 But like this, it is correct. 206 00:11:28,980 --> 00:11:31,053 It is still a bit too small, I think. 207 00:11:32,440 --> 00:11:33,840 Let's actually reload, 208 00:11:33,840 --> 00:11:35,963 so that the text goes back to normal. 209 00:11:37,880 --> 00:11:39,410 Okay. 210 00:11:39,410 --> 00:11:42,130 And let's increase this a little bit here, 211 00:11:42,130 --> 00:11:43,353 just so we can see it. 212 00:11:44,450 --> 00:11:49,450 So 35, which is like a middle ground between 30 and 40, 213 00:11:50,340 --> 00:11:52,240 and 40 looks way too much. 214 00:11:52,240 --> 00:11:54,233 I think that's the one we tried before. 215 00:11:55,300 --> 00:11:59,800 So 30 was too little, so let's keep it here at 35. 216 00:11:59,800 --> 00:12:01,380 Okay? 217 00:12:01,380 --> 00:12:05,110 Now I think there is still too much space here, 218 00:12:05,110 --> 00:12:08,023 between this image and this text. 219 00:12:10,060 --> 00:12:12,317 So let's inspect this here, 220 00:12:12,317 --> 00:12:16,193 and the reason is that this grid here has a huge gap. 221 00:12:17,110 --> 00:12:22,110 So it has, I believe 9.6 rem vertically and horizontally. 222 00:12:23,660 --> 00:12:25,930 And horizontally I think it makes sense, 223 00:12:25,930 --> 00:12:29,960 because we have been using this 9.6 here all the time. 224 00:12:29,960 --> 00:12:31,790 So it's also the margin here, 225 00:12:31,790 --> 00:12:35,430 between this heading and the start of this content. 226 00:12:35,430 --> 00:12:37,490 And it's also what we have here at the beginning 227 00:12:37,490 --> 00:12:39,573 and the end of each section. 228 00:12:41,180 --> 00:12:44,000 So for the row, again, I think it makes sense, 229 00:12:44,000 --> 00:12:45,660 but not for the column. 230 00:12:45,660 --> 00:12:47,480 That's just a bit too much, 231 00:12:47,480 --> 00:12:51,460 especially imagine if we had four columns side by side, 232 00:12:51,460 --> 00:12:54,773 then this huge gap would take away a lot of the space. 233 00:12:55,670 --> 00:13:00,670 So let's fix the image here, set it to 35% of width, 234 00:13:00,810 --> 00:13:05,133 and then let's fix this gap here and make it a lot smaller. 235 00:13:06,240 --> 00:13:10,743 So 35 and then our grid is of course in the general CSS, 236 00:13:12,615 --> 00:13:15,960 so we want this to be the row gap. 237 00:13:15,960 --> 00:13:18,000 So keeping that for the row, 238 00:13:18,000 --> 00:13:19,940 but then for the column gap, 239 00:13:19,940 --> 00:13:23,320 let's set it to 6.4, 240 00:13:23,320 --> 00:13:27,453 which I think is two steps down from what we had before. 241 00:13:28,380 --> 00:13:29,303 Okay. 242 00:13:30,320 --> 00:13:34,400 And well, that didn't change a whole lot, 243 00:13:34,400 --> 00:13:35,363 it looks like. 244 00:13:36,660 --> 00:13:39,840 At least I don't remember what it looked like before. 245 00:13:39,840 --> 00:13:44,840 Well, we can try putting it back here. 246 00:13:47,530 --> 00:13:50,773 And yeah, I think some text here now shifted down actually. 247 00:13:56,770 --> 00:14:01,040 But anyway, yeah, this will be important also later on 248 00:14:01,040 --> 00:14:02,720 for the other sections, 249 00:14:02,720 --> 00:14:04,763 when we have more than just two columns. 250 00:14:06,940 --> 00:14:09,100 All right. Now, here actually, 251 00:14:09,100 --> 00:14:12,363 the content is smaller than this one here. 252 00:14:13,210 --> 00:14:14,530 So... 253 00:14:16,170 --> 00:14:21,150 basically here in step two, 254 00:14:21,150 --> 00:14:22,700 this has this size, 255 00:14:22,700 --> 00:14:26,190 but here we finish here, like too soon, 256 00:14:26,190 --> 00:14:28,090 and I think the same will happen here. 257 00:14:29,720 --> 00:14:33,950 And so what this means is that we want to vertically align 258 00:14:33,950 --> 00:14:35,203 this element right here. 259 00:14:36,900 --> 00:14:39,450 So, how can we do that? 260 00:14:39,450 --> 00:14:41,693 Well, there are multiple ways. 261 00:14:44,121 --> 00:14:46,940 So the first one would to also make this element here, 262 00:14:46,940 --> 00:14:48,440 a flex container, 263 00:14:48,440 --> 00:14:51,743 just like we did here to vertically align the images. 264 00:14:53,431 --> 00:14:55,410 So vertically and horizontally aligned 265 00:14:55,410 --> 00:14:56,930 in the case of the images, 266 00:14:56,930 --> 00:14:59,400 but here we just want it vertically. 267 00:14:59,400 --> 00:15:01,970 So again, we could use a flex container, 268 00:15:01,970 --> 00:15:04,330 but here we actually have multiple elements, 269 00:15:04,330 --> 00:15:07,310 and we would then have to change the flex direction, 270 00:15:07,310 --> 00:15:10,810 so that they are back to being vertically stacked, 271 00:15:10,810 --> 00:15:12,093 like we want them to be. 272 00:15:12,975 --> 00:15:14,460 And then we would have to 273 00:15:14,460 --> 00:15:17,120 justify content centered down. 274 00:15:17,120 --> 00:15:20,730 So that seems like a bit too much work here in this case, 275 00:15:20,730 --> 00:15:22,640 so the next option would be 276 00:15:22,640 --> 00:15:26,430 to select these step text box here, 277 00:15:26,430 --> 00:15:28,810 and then, since they are grid items, 278 00:15:28,810 --> 00:15:33,810 we could set align self to center, I think. 279 00:15:34,080 --> 00:15:36,490 And so let's actually do that. 280 00:15:36,490 --> 00:15:38,910 So this is the one that we will choose, 281 00:15:38,910 --> 00:15:40,550 but there will be another one. 282 00:15:40,550 --> 00:15:42,680 So we could also simply set 283 00:15:42,680 --> 00:15:45,190 on the entire grid container here, 284 00:15:45,190 --> 00:15:48,383 the align items property to center as well. 285 00:15:50,200 --> 00:15:51,363 So this is what I mean, 286 00:15:52,270 --> 00:15:54,573 let me show it to you here in the inspector. 287 00:15:55,750 --> 00:15:59,480 So align items set to center. 288 00:15:59,480 --> 00:16:00,960 And so, as I just said, 289 00:16:00,960 --> 00:16:02,810 that would then immediately fix that. 290 00:16:04,180 --> 00:16:05,700 If you look at that one here, 291 00:16:05,700 --> 00:16:09,953 it is now vertically centered and the same down here. 292 00:16:12,800 --> 00:16:15,250 So we could do this or again, 293 00:16:15,250 --> 00:16:18,833 we could also select all of these elements here. 294 00:16:19,960 --> 00:16:22,390 So like this one here, 295 00:16:22,390 --> 00:16:25,210 and then align them individually to the center 296 00:16:25,210 --> 00:16:27,350 by using align self. 297 00:16:27,350 --> 00:16:31,030 So you can do whichever you prefer, but, 298 00:16:31,030 --> 00:16:33,030 well, I thought I would do this one, 299 00:16:33,030 --> 00:16:37,600 but actually I prefer to set it on the parent element. 300 00:16:37,600 --> 00:16:41,523 So setting align items to center on the grid itself. 301 00:16:42,460 --> 00:16:43,993 So let's do that. 302 00:16:45,580 --> 00:16:47,640 So back here on the grid, 303 00:16:47,640 --> 00:16:50,970 but where do you think I should put that? 304 00:16:50,970 --> 00:16:54,400 I should not just put it here, right? 305 00:16:54,400 --> 00:16:57,850 So align items set to center. 306 00:16:57,850 --> 00:16:59,123 So that would work. 307 00:17:01,380 --> 00:17:03,540 So even after reloading here, now, 308 00:17:03,540 --> 00:17:06,253 everything is nicely and vertically centered, 309 00:17:07,151 --> 00:17:09,770 but this is not the way to go, 310 00:17:09,770 --> 00:17:14,770 because again, this grid is supposed to be reusable, right? 311 00:17:14,900 --> 00:17:18,980 And we might not want this setting in future grids. 312 00:17:18,980 --> 00:17:21,210 So for example, in the next section, 313 00:17:21,210 --> 00:17:22,870 we will create some cards, 314 00:17:22,870 --> 00:17:24,780 and then, on the side of that, 315 00:17:24,780 --> 00:17:27,270 we will have that lists of diets. 316 00:17:27,270 --> 00:17:28,280 Remember that? 317 00:17:28,280 --> 00:17:32,040 And so those, we will not want them vertically aligned 318 00:17:32,040 --> 00:17:32,903 in the center. 319 00:17:33,870 --> 00:17:36,950 Therefore, then we could not use this grid, 320 00:17:36,950 --> 00:17:38,963 which, of course, we want to use. 321 00:17:40,290 --> 00:17:42,520 So the solution to do that 322 00:17:42,520 --> 00:17:45,190 is to basically create yet another class, 323 00:17:45,190 --> 00:17:49,363 which will act like basically yet another grid setting. 324 00:17:52,160 --> 00:17:55,330 So these can be seen as grid settings as well. 325 00:17:55,330 --> 00:17:57,960 So adding some stuff to the grid, 326 00:17:57,960 --> 00:18:02,960 and so we can do the same for things like this alignment. 327 00:18:03,000 --> 00:18:05,120 So I'm calling it grid 328 00:18:06,000 --> 00:18:10,140 and then center vertically, 329 00:18:10,140 --> 00:18:14,750 and so I just take that from here, paste it here, 330 00:18:14,750 --> 00:18:17,813 and then we can simply add this class to this grid. 331 00:18:20,090 --> 00:18:20,923 Okay. 332 00:18:22,430 --> 00:18:25,540 And if this seems too confusing for you, 333 00:18:25,540 --> 00:18:29,290 of course, all of this would not be strictly necessary. 334 00:18:29,290 --> 00:18:31,490 So you could just create one grid 335 00:18:31,490 --> 00:18:35,280 for each of the grids that you want on your page, 336 00:18:35,280 --> 00:18:37,463 so without having these reusable grids. 337 00:18:39,272 --> 00:18:40,810 That would be perfectly possible, 338 00:18:40,810 --> 00:18:44,760 but for a scalable page and to make our code a bit cleaner, 339 00:18:44,760 --> 00:18:46,210 I'm showing you this technique, 340 00:18:46,210 --> 00:18:48,773 because I think it is a lot more valuable. 341 00:18:49,630 --> 00:18:50,570 Okay. 342 00:18:50,570 --> 00:18:54,080 But anyway, now you see that it still works. 343 00:18:54,080 --> 00:18:59,080 And so seeing again in the inspector on our grid, 344 00:18:59,530 --> 00:19:01,360 so the parent grid container, 345 00:19:01,360 --> 00:19:03,493 now we have all these settings here. 346 00:19:04,390 --> 00:19:06,160 So we have a display as a grid, 347 00:19:06,160 --> 00:19:08,000 we have all these gaps, 348 00:19:08,000 --> 00:19:10,720 then we have it with these two columns, 349 00:19:10,720 --> 00:19:12,863 and we have align items to center. 350 00:19:14,611 --> 00:19:15,470 Okay. 351 00:19:15,470 --> 00:19:16,303 And with this, 352 00:19:16,303 --> 00:19:19,933 we could now actually say that we finished this section. 353 00:19:21,540 --> 00:19:23,490 So it looks quite nice, 354 00:19:23,490 --> 00:19:25,520 but I still have this issue, 355 00:19:25,520 --> 00:19:27,933 that there is way too much spacing here. 356 00:19:28,820 --> 00:19:30,210 So right here. 357 00:19:30,210 --> 00:19:32,260 And if you ask me, 358 00:19:32,260 --> 00:19:35,710 it doesn't look so interesting visually as well. 359 00:19:35,710 --> 00:19:39,730 So again, we could just declare this design as finished, 360 00:19:39,730 --> 00:19:42,010 but instead, what I'm gonna do 361 00:19:42,010 --> 00:19:45,690 is to add a circle here to the background, 362 00:19:45,690 --> 00:19:49,090 so behind, basically, this green here. 363 00:19:49,090 --> 00:19:50,900 And this will make more sense 364 00:19:50,900 --> 00:19:53,210 once I actually show it to you. 365 00:19:53,210 --> 00:19:55,680 And I think the circle will look quite nice, 366 00:19:55,680 --> 00:19:58,930 because there are actually quite some circles already. 367 00:19:58,930 --> 00:20:01,480 So here in this design itself, 368 00:20:01,480 --> 00:20:03,260 there are circles here anywhere, 369 00:20:03,260 --> 00:20:04,990 and also in the logo type, 370 00:20:04,990 --> 00:20:07,830 we have actually these two circles. 371 00:20:07,830 --> 00:20:12,060 So the circle is kind of like a brand element itself, 372 00:20:12,060 --> 00:20:13,240 if you want. 373 00:20:13,240 --> 00:20:15,530 We have some circles here as well, 374 00:20:15,530 --> 00:20:18,003 and so I think this might look quite nice. 375 00:20:19,260 --> 00:20:23,173 So adding a circle basically means to add a new element. 376 00:20:24,020 --> 00:20:26,150 And so, let's do that, 377 00:20:26,150 --> 00:20:29,783 but we do not want to do that in the HTML. 378 00:20:31,379 --> 00:20:33,740 So we do not want to come here, 379 00:20:33,740 --> 00:20:36,390 and inside of the hero image box, 380 00:20:36,390 --> 00:20:40,160 add some new div and then call it circle. 381 00:20:40,160 --> 00:20:42,920 So we do not want to pollute our HTML 382 00:20:42,920 --> 00:20:45,030 with those visual things, 383 00:20:45,030 --> 00:20:47,700 and so instead, we're going to, once again, 384 00:20:47,700 --> 00:20:51,490 use a pseudo-element, remember that? 385 00:20:51,490 --> 00:20:55,220 Well, a pseudo-element like after or before, 386 00:20:55,220 --> 00:20:59,760 basically insert a child element into the parent. 387 00:20:59,760 --> 00:21:02,830 So in this case, this hero image box, 388 00:21:02,830 --> 00:21:05,200 and we can then use that element 389 00:21:05,200 --> 00:21:07,880 as if it was in the HTML. 390 00:21:07,880 --> 00:21:10,803 So even though it is not really, okay? 391 00:21:11,810 --> 00:21:14,600 Now this pseudo-element needs to be added 392 00:21:14,600 --> 00:21:17,750 to this div element here. 393 00:21:17,750 --> 00:21:18,890 So this one here, 394 00:21:18,890 --> 00:21:21,343 because we cannot add it to images. 395 00:21:22,420 --> 00:21:23,790 Okay? 396 00:21:23,790 --> 00:21:26,110 So the before and after pseudo-elements 397 00:21:26,110 --> 00:21:28,240 cannot be added to images, 398 00:21:28,240 --> 00:21:31,140 because, well, in the HTML themselves, 399 00:21:31,140 --> 00:21:34,433 we are not allowed to add child elements to images. 400 00:21:36,620 --> 00:21:38,173 So we will simply add it here. 401 00:21:43,330 --> 00:21:45,233 So let's use the before one, 402 00:21:46,720 --> 00:21:49,660 and remember to make it actually appear on the page. 403 00:21:49,660 --> 00:21:51,990 We need to give it some content. 404 00:21:51,990 --> 00:21:53,400 And it doesn't matter what, 405 00:21:53,400 --> 00:21:54,970 it can even be empty, 406 00:21:54,970 --> 00:21:56,270 but it needs to have some. 407 00:21:57,460 --> 00:22:00,740 Then usually we can set this to a block element, 408 00:22:00,740 --> 00:22:04,763 especially if we simply want to make it into a shape, 409 00:22:05,690 --> 00:22:07,803 which is basically what we want to do. 410 00:22:08,820 --> 00:22:11,430 Now, let's give it some width here as well, 411 00:22:11,430 --> 00:22:13,060 because just as the image, 412 00:22:13,060 --> 00:22:15,890 we also want this one here to be flexible, 413 00:22:15,890 --> 00:22:19,143 so that's why we are gonna use percentages here as well. 414 00:22:20,100 --> 00:22:23,170 So let's go with 60%, 415 00:22:23,170 --> 00:22:25,890 since the image is 35. 416 00:22:25,890 --> 00:22:28,513 And so this is significantly more than that. 417 00:22:30,010 --> 00:22:33,540 And then let's set the height also to 60%, 418 00:22:33,540 --> 00:22:34,880 and this is just to show you 419 00:22:34,880 --> 00:22:37,960 that actually it will not work as expected, 420 00:22:37,960 --> 00:22:41,160 but still I'm going to do it, okay? 421 00:22:41,160 --> 00:22:43,623 Because this is actually important to understand. 422 00:22:45,070 --> 00:22:47,983 Okay, now let's just give it some background color, 423 00:22:49,780 --> 00:22:51,693 and I will use this very light one. 424 00:22:52,590 --> 00:22:57,090 So the lightest basically white or yellow 425 00:22:57,090 --> 00:22:58,363 that we have on the page. 426 00:22:59,660 --> 00:23:03,140 Okay, so this will not look really good yet, 427 00:23:03,140 --> 00:23:04,740 but let's just see what we have. 428 00:23:05,900 --> 00:23:09,353 Well, actually, it's not really there at all. 429 00:23:11,360 --> 00:23:13,943 So let's inspect what's going on here. 430 00:23:15,280 --> 00:23:17,100 Ah, here it is. 431 00:23:17,100 --> 00:23:19,020 So it does have some width, 432 00:23:19,020 --> 00:23:20,733 but apparently no height. 433 00:23:22,740 --> 00:23:25,460 Right, so let's give it some height manually here, 434 00:23:25,460 --> 00:23:26,813 like 100 pixels. 435 00:23:27,790 --> 00:23:30,770 And now you see it, right? 436 00:23:30,770 --> 00:23:33,520 So if we can not use 60% here 437 00:23:33,520 --> 00:23:36,700 in order to make it basically a square, 438 00:23:36,700 --> 00:23:38,100 and we need it to be a square, 439 00:23:38,100 --> 00:23:40,170 so that we can then make it a circle, 440 00:23:40,170 --> 00:23:43,193 we need to find another way of defining the height. 441 00:23:44,137 --> 00:23:47,660 And so let me show you a nice hack that we can use. 442 00:23:47,660 --> 00:23:51,550 So this is like a trick that goes around 443 00:23:51,550 --> 00:23:53,853 this thing of this not working. 444 00:23:54,700 --> 00:23:56,410 So let me comment this out, 445 00:23:56,410 --> 00:23:58,313 and now let me show you that trick. 446 00:23:59,150 --> 00:24:00,670 So what we can do basically 447 00:24:00,670 --> 00:24:04,230 to give it the same height of 60%, 448 00:24:04,230 --> 00:24:06,493 is to add a padding to the bottom. 449 00:24:08,150 --> 00:24:13,150 So padding bottom, and now here we can define it as 60%. 450 00:24:14,150 --> 00:24:17,730 And this works because even the padding to the bottom 451 00:24:17,730 --> 00:24:21,610 is actually defined on the width of the element. 452 00:24:21,610 --> 00:24:22,790 Okay? 453 00:24:22,790 --> 00:24:25,680 So again, these 60% here 454 00:24:25,680 --> 00:24:30,100 are actually 60% of the parent's elements width. 455 00:24:30,100 --> 00:24:33,610 All right, so basically exactly like this. 456 00:24:33,610 --> 00:24:35,870 And this is very important to understand, 457 00:24:35,870 --> 00:24:37,370 so let me show it. 458 00:24:37,370 --> 00:24:39,820 So let me actually write that here. 459 00:24:39,820 --> 00:24:44,400 60% of parent's width, 460 00:24:44,400 --> 00:24:46,000 and that again is true, 461 00:24:46,000 --> 00:24:48,960 even when we add that to the bottom here. 462 00:24:48,960 --> 00:24:51,660 And so this will now basically create an element 463 00:24:51,660 --> 00:24:54,380 with an intrinsic height of zero, 464 00:24:54,380 --> 00:24:57,580 but then with a padding of 60%, 465 00:24:57,580 --> 00:24:59,130 which will then make it square. 466 00:25:00,950 --> 00:25:04,420 Right, so again, the height is basically zero, 467 00:25:04,420 --> 00:25:06,430 but then, since we're adding all that padding 468 00:25:06,430 --> 00:25:07,560 here to the bottom, 469 00:25:07,560 --> 00:25:10,073 it will appear as if it was a square. 470 00:25:12,484 --> 00:25:14,830 And so that is a very nice trick. 471 00:25:14,830 --> 00:25:15,870 Great. 472 00:25:15,870 --> 00:25:18,650 So we're going to make it a square, 473 00:25:18,650 --> 00:25:23,039 so it's here now and it's here and on all of them, 474 00:25:23,039 --> 00:25:24,630 but as you see it, 475 00:25:24,630 --> 00:25:27,550 it is now kind of pushing this one here to the side, 476 00:25:27,550 --> 00:25:30,503 because, of course, it needs to occupy this space here. 477 00:25:32,210 --> 00:25:35,430 Now in order to basically take it out of the flow here, 478 00:25:35,430 --> 00:25:40,130 and also to position it nicely, like behind this image, 479 00:25:40,130 --> 00:25:42,713 we can simply position it absolutely. 480 00:25:44,340 --> 00:25:46,110 And so let's do that. 481 00:25:46,110 --> 00:25:48,840 And so this technique is basically exactly the same 482 00:25:48,840 --> 00:25:50,950 that we used before. 483 00:25:50,950 --> 00:25:54,730 For example, in our very first project to mark, 484 00:25:54,730 --> 00:25:57,983 I think a blog post as a top post. 485 00:25:58,964 --> 00:26:01,793 I think that's what we did back then. 486 00:26:02,780 --> 00:26:05,983 And yeah, so this is the exact same technique. 487 00:26:07,190 --> 00:26:10,610 So position absolute, 488 00:26:10,610 --> 00:26:13,020 and remember that in order for this to work, 489 00:26:13,020 --> 00:26:15,770 we need to actually make the parent element 490 00:26:15,770 --> 00:26:19,793 in relation to which we want this one to be positioned. 491 00:26:21,230 --> 00:26:23,323 We need to make it position relative. 492 00:26:26,764 --> 00:26:29,020 So we can start here with top 50% 493 00:26:31,940 --> 00:26:33,650 and left 50%, 494 00:26:33,650 --> 00:26:37,330 because, remember, we want it centered, right? 495 00:26:37,330 --> 00:26:39,930 But you know already that this is not going to work. 496 00:26:41,791 --> 00:26:42,950 So it puts it here, 497 00:26:42,950 --> 00:26:45,943 where basically this corner is now at the very center. 498 00:26:48,400 --> 00:26:50,940 And so, remember the technique that I showed you 499 00:26:50,940 --> 00:26:52,560 in our last section, 500 00:26:52,560 --> 00:26:55,700 which is to use the transform property 501 00:26:55,700 --> 00:26:58,370 with the function of translate. 502 00:26:58,370 --> 00:27:01,750 So translate will basically shift the element, 503 00:27:01,750 --> 00:27:05,690 in this case 50% of its same width 504 00:27:05,690 --> 00:27:07,800 and of its own height. 505 00:27:07,800 --> 00:27:11,173 So 50% and actually minus, 506 00:27:12,340 --> 00:27:16,390 and then also minus 50% to pull it back up 507 00:27:16,390 --> 00:27:19,940 exactly by half of its own height. 508 00:27:19,940 --> 00:27:23,050 Okay, so let's check that out. 509 00:27:23,050 --> 00:27:25,830 And indeed there it is. 510 00:27:25,830 --> 00:27:28,170 So it is nicely centered 511 00:27:28,170 --> 00:27:30,870 and this time not using flexbox, 512 00:27:30,870 --> 00:27:33,820 but instead using absolute positioning. 513 00:27:33,820 --> 00:27:36,360 And we didn't use flexbox here, 514 00:27:36,360 --> 00:27:39,600 well, because we basically want this element here 515 00:27:39,600 --> 00:27:43,143 to occupy the exact same space as the image. 516 00:27:44,420 --> 00:27:47,940 And so here flexbox was not the right way to go, 517 00:27:47,940 --> 00:27:51,793 while with the image, it was, okay? 518 00:27:52,670 --> 00:27:54,430 Now let's just make it round, 519 00:27:54,430 --> 00:27:56,450 but of course, you're still wondering 520 00:27:56,450 --> 00:28:00,763 why is that square actually on top of the image. 521 00:28:02,060 --> 00:28:04,603 So let's fix that as a next step. 522 00:28:06,670 --> 00:28:11,160 For now, let's actually put that below here, 523 00:28:11,160 --> 00:28:14,623 just so we keep the context of this comment here. 524 00:28:16,920 --> 00:28:20,970 So now it's nicely this circle, 525 00:28:20,970 --> 00:28:24,993 but now we basically need to put it behind this image. 526 00:28:25,850 --> 00:28:30,090 So this one here has been positioned on top of the image, 527 00:28:30,090 --> 00:28:32,240 and that is not what we want, 528 00:28:32,240 --> 00:28:36,480 but fortunately for us, using CSS we can fix that, 529 00:28:36,480 --> 00:28:38,950 because there is this very handy property 530 00:28:38,950 --> 00:28:40,533 called Z index. 531 00:28:41,860 --> 00:28:45,790 Now Z index can be a little bit tricky to work with, 532 00:28:45,790 --> 00:28:48,600 because there are many, many particularities to it. 533 00:28:48,600 --> 00:28:52,260 And the way it works is quite confusing actually. 534 00:28:52,260 --> 00:28:53,803 But when it does work, 535 00:28:53,803 --> 00:28:56,150 then basically elements that have 536 00:28:56,150 --> 00:28:58,420 a higher value of the index 537 00:28:58,420 --> 00:29:02,113 will appear first, so will appear on top. 538 00:29:03,926 --> 00:29:06,110 So what we're gonna do here is 539 00:29:06,110 --> 00:29:10,110 to simply reduce the value here. 540 00:29:10,110 --> 00:29:14,230 So instead of adding a positive value to the image, 541 00:29:14,230 --> 00:29:16,403 we will simply add a negative value here. 542 00:29:17,350 --> 00:29:21,570 And so that will then basically push it back in the order. 543 00:29:21,570 --> 00:29:24,500 So for example, we can use minus one. 544 00:29:24,500 --> 00:29:27,350 And so now it's fixed. 545 00:29:27,350 --> 00:29:30,293 So now it's basically below the image. 546 00:29:31,330 --> 00:29:33,560 Now, another way would've been 547 00:29:33,560 --> 00:29:36,270 to put the positive Z index here, 548 00:29:36,270 --> 00:29:39,330 but that might not work for some reason. 549 00:29:39,330 --> 00:29:42,170 Let's just say 10, for example, 550 00:29:42,170 --> 00:29:45,830 and so actually this also worked in this case, 551 00:29:45,830 --> 00:29:48,900 but I'm still doing it like this, 552 00:29:48,900 --> 00:29:53,510 as we did before, for something that I will explain next. 553 00:29:53,510 --> 00:29:54,730 Okay. 554 00:29:54,730 --> 00:29:57,410 So this looks quite nice already, 555 00:29:57,410 --> 00:29:59,630 but we can still do better, 556 00:29:59,630 --> 00:30:01,793 which is to add another circle here. 557 00:30:02,630 --> 00:30:04,370 So this is just one circle, 558 00:30:04,370 --> 00:30:06,510 it looks a little bit boring. 559 00:30:06,510 --> 00:30:09,160 So it has the same background color as this one 560 00:30:09,160 --> 00:30:11,220 and still not really interesting, 561 00:30:11,220 --> 00:30:13,200 and so I will add another, 562 00:30:13,200 --> 00:30:18,130 a bit smaller circle, right here, like this, okay? 563 00:30:18,130 --> 00:30:20,470 So this is something that, again, 564 00:30:20,470 --> 00:30:22,670 I saw somewhere on some other site, 565 00:30:22,670 --> 00:30:25,290 when I was looking for inspiration. 566 00:30:25,290 --> 00:30:28,480 And so basically I'm stealing like an artist here, 567 00:30:28,480 --> 00:30:31,310 once again, okay? 568 00:30:31,310 --> 00:30:35,120 So I didn't come up with this on my own, once more, 569 00:30:35,120 --> 00:30:37,770 I just saw this in some other website, 570 00:30:37,770 --> 00:30:40,160 which I do not remember, unfortunately, 571 00:30:40,160 --> 00:30:41,510 so I cannot show it to you. 572 00:30:42,900 --> 00:30:43,733 Okay? 573 00:30:44,780 --> 00:30:48,390 So what we're gonna do is to add another pseudo-element, 574 00:30:48,390 --> 00:30:50,960 but we cannot use before again. 575 00:30:50,960 --> 00:30:53,440 So we can only use before once. 576 00:30:53,440 --> 00:30:54,890 But fortunately for us, 577 00:30:54,890 --> 00:30:56,280 there is also after, 578 00:30:56,280 --> 00:30:59,163 which basically does the exact same thing. 579 00:31:01,400 --> 00:31:06,400 So we can just do step image box, 580 00:31:07,270 --> 00:31:09,313 and then after. 581 00:31:10,280 --> 00:31:13,680 Now, many of the things here will be exactly the same 582 00:31:13,680 --> 00:31:17,790 except here for the width and the background color. 583 00:31:17,790 --> 00:31:22,790 And so let's basically export all of this here into, 584 00:31:23,150 --> 00:31:25,300 again, a list of these two 585 00:31:25,300 --> 00:31:27,300 and then have the styles that are unique 586 00:31:29,030 --> 00:31:32,170 simply in each of these CSS rules. 587 00:31:32,170 --> 00:31:36,523 So before and after will be, 588 00:31:38,210 --> 00:31:40,140 well, I'm just gonna cut everything 589 00:31:42,570 --> 00:31:43,883 except this. 590 00:31:47,340 --> 00:31:48,173 Okay. 591 00:31:49,657 --> 00:31:52,250 So both of them will have this, 592 00:31:52,250 --> 00:31:55,170 and actually the Z index also must be unique, 593 00:31:55,170 --> 00:31:56,563 as we will see in a minute. 594 00:31:58,980 --> 00:32:02,030 Okay, and now let's make this here slightly smaller, 595 00:32:02,030 --> 00:32:02,993 as I was saying. 596 00:32:04,450 --> 00:32:07,533 So our width, let's say 50% here, 597 00:32:08,795 --> 00:32:11,340 and then using that trick that we used before 598 00:32:12,630 --> 00:32:15,690 making that one also 50%, 599 00:32:15,690 --> 00:32:17,820 and then the background color, 600 00:32:17,820 --> 00:32:20,423 and here I want it to be slightly darker. 601 00:32:21,580 --> 00:32:26,580 So let's go here to our tint generator, 602 00:32:27,360 --> 00:32:29,470 and so this is the one we have been using, 603 00:32:29,470 --> 00:32:32,283 and I'm now simply going to go with the next one. 604 00:32:33,360 --> 00:32:34,563 So copying it, 605 00:32:35,700 --> 00:32:37,730 and I'm also putting it right here, 606 00:32:37,730 --> 00:32:39,783 into the general file immediately. 607 00:32:41,320 --> 00:32:42,693 So now we have multiple, 608 00:32:44,550 --> 00:32:45,913 let's put this here down. 609 00:32:47,200 --> 00:32:48,130 Okay. 610 00:32:48,130 --> 00:32:51,383 And you can see here also that it is a little bit darker, 611 00:32:52,660 --> 00:32:54,410 but it does make a lot of difference 612 00:32:54,410 --> 00:32:56,283 when used in background colors. 613 00:32:57,980 --> 00:33:00,570 Okay, let's see. 614 00:33:00,570 --> 00:33:02,943 So this should already be on the page now, 615 00:33:04,320 --> 00:33:06,123 and yeah, there we go. 616 00:33:07,240 --> 00:33:08,950 I think it's a bit too big 617 00:33:08,950 --> 00:33:12,803 and it is also on top of the image once again. 618 00:33:14,860 --> 00:33:19,410 So let's make it smaller, as I was saying, 619 00:33:19,410 --> 00:33:20,933 45 maybe, 620 00:33:23,150 --> 00:33:25,193 and then the Z index, 621 00:33:26,070 --> 00:33:29,030 let's also put it to minus one. 622 00:33:29,030 --> 00:33:32,830 And this one we actually want to be at the top of this one. 623 00:33:32,830 --> 00:33:35,570 So the smaller one on top of the bigger one, 624 00:33:35,570 --> 00:33:37,253 so let's make this one minus two. 625 00:33:38,330 --> 00:33:41,800 And yeah, there we go. 626 00:33:41,800 --> 00:33:43,800 This is the effect I was looking for, 627 00:33:43,800 --> 00:33:46,530 and just by adding this small thing here on the side, 628 00:33:46,530 --> 00:33:49,950 makes it look a lot more interesting and a lot nicer, 629 00:33:49,950 --> 00:33:51,290 I think. 630 00:33:51,290 --> 00:33:55,490 Yeah, I think this actually finishes this part. 631 00:33:55,490 --> 00:33:59,020 So this section, let's check it out from the beginning, 632 00:33:59,020 --> 00:34:02,350 but I think everything is nice and beautiful. 633 00:34:02,350 --> 00:34:04,940 So I had a lot of fun designing this section, 634 00:34:04,940 --> 00:34:09,000 and the result I think is really, really nice. 635 00:34:09,000 --> 00:34:10,850 So hopefully you think the same, 636 00:34:10,850 --> 00:34:14,180 and you still learned a lot of stuff here along the way. 637 00:34:14,180 --> 00:34:15,550 So you learned how to use 638 00:34:15,550 --> 00:34:18,190 the after and before pseudo-elements 639 00:34:18,190 --> 00:34:20,740 to create a nice design like this. 640 00:34:20,740 --> 00:34:23,720 You also learned about the Z index property, 641 00:34:23,720 --> 00:34:25,680 which is quite important. 642 00:34:25,680 --> 00:34:29,300 And as I mentioned, it's not always super easy to use, 643 00:34:29,300 --> 00:34:32,210 and usually you will have to experiment a lot 644 00:34:32,210 --> 00:34:36,630 in order to make it work the way you intend. 645 00:34:36,630 --> 00:34:41,630 Then we also went back to using again this technique here. 646 00:34:42,120 --> 00:34:44,010 So this centering technique, 647 00:34:44,010 --> 00:34:48,540 using absolute positioning and then top left and transform. 648 00:34:48,540 --> 00:34:50,470 So this is a really important one, 649 00:34:50,470 --> 00:34:52,200 and that's why I mentioned before 650 00:34:52,200 --> 00:34:54,700 that you really should make sure that you know it 651 00:34:54,700 --> 00:34:55,803 before moving on. 652 00:34:56,700 --> 00:35:00,070 So it was great that we had another opportunity 653 00:35:00,070 --> 00:35:02,030 to practice here. 654 00:35:02,030 --> 00:35:03,210 Now, okay. 655 00:35:03,210 --> 00:35:05,350 And with this, we finish this section 656 00:35:05,350 --> 00:35:09,923 and are now hopefully ready to go straight to the next one. 46836

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.