All language subtitles for 041 Pseudo-elements.en_US

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
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
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian Download
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,890 --> 00:00:04,990 So we talked about pseudo classes before. 2 00:00:04,990 --> 00:00:08,220 So now let's talk about pseudo elements, 3 00:00:08,220 --> 00:00:11,370 which are a nice little CSS feature 4 00:00:11,370 --> 00:00:13,573 that is worth learning about. 5 00:00:15,460 --> 00:00:18,670 So pseudo elements are essentially elements 6 00:00:18,670 --> 00:00:21,550 that don't exist in the HTML, 7 00:00:21,550 --> 00:00:26,360 but that we can still select and style in CSS. 8 00:00:26,360 --> 00:00:28,570 And some common examples of that 9 00:00:28,570 --> 00:00:31,650 are the first letter of a paragraph 10 00:00:31,650 --> 00:00:34,100 or the first line of a paragraph 11 00:00:34,100 --> 00:00:36,490 or of some other texts of course. 12 00:00:36,490 --> 00:00:39,687 So let's start with that first example that I gave you, 13 00:00:39,687 --> 00:00:41,820 of the first letter. 14 00:00:41,820 --> 00:00:46,210 So what we can do using a first letter pseudo element 15 00:00:46,210 --> 00:00:51,210 is to select the very first letter of this H1 here, 16 00:00:51,970 --> 00:00:53,690 which would be this emoji, 17 00:00:53,690 --> 00:00:56,160 and then we could format it differently. 18 00:00:56,160 --> 00:00:56,993 And so with that, 19 00:00:56,993 --> 00:01:00,810 we could fix the fact that this is also italic, 20 00:01:00,810 --> 00:01:03,160 which doesn't make a lot of sense. 21 00:01:03,160 --> 00:01:06,390 So in the end, it's going to look like this. 22 00:01:06,390 --> 00:01:07,960 So no longer italic, 23 00:01:07,960 --> 00:01:11,023 and even with some space there on the right side. 24 00:01:12,000 --> 00:01:15,223 So let's see how that is going to work. 25 00:01:17,490 --> 00:01:20,543 So let's come somewhere down here, 26 00:01:23,209 --> 00:01:25,860 and then let's say H1, 27 00:01:25,860 --> 00:01:27,730 so we are selecting H1, 28 00:01:27,730 --> 00:01:32,160 and then the pseudo element is written using two colons. 29 00:01:32,160 --> 00:01:36,763 So colon colon, and then first letter. 30 00:01:38,450 --> 00:01:40,050 All right. 31 00:01:40,050 --> 00:01:44,230 So pseudo classes are written with just one colon 32 00:01:44,230 --> 00:01:47,310 and the pseudo elements are with two colons. 33 00:01:47,310 --> 00:01:49,710 And so with that, we can easily distinguish 34 00:01:49,710 --> 00:01:53,270 between pseudo elements and pseudo classes. 35 00:01:53,270 --> 00:01:56,620 So let's style that very first letter. 36 00:01:56,620 --> 00:02:01,620 Let's say font style should be not italic, but normal. 37 00:02:06,170 --> 00:02:10,450 And let's also give it some margin to the right, 38 00:02:10,450 --> 00:02:11,633 of five pixels. 39 00:02:13,980 --> 00:02:15,423 And there you go. 40 00:02:16,280 --> 00:02:17,240 Do you see that? 41 00:02:17,240 --> 00:02:21,880 Now there is some space and the text is no longer italic. 42 00:02:21,880 --> 00:02:23,130 Great. 43 00:02:23,130 --> 00:02:23,963 And of course, 44 00:02:23,963 --> 00:02:28,963 that would also have worked with any other off the headings, 45 00:02:28,990 --> 00:02:30,940 and with any other letter. 46 00:02:30,940 --> 00:02:34,670 So of course it doesn't just work with emojis. 47 00:02:34,670 --> 00:02:38,890 So let's say we wanted the first letter here of the H2, 48 00:02:38,890 --> 00:02:40,830 to be a lot bigger. 49 00:02:40,830 --> 00:02:45,730 Let's say font size 60 pixels for example, 50 00:02:45,730 --> 00:02:48,830 or to make it even more visible 80 pixels. 51 00:02:48,830 --> 00:02:50,083 And there you go. 52 00:02:51,200 --> 00:02:54,220 So basically we selected this pseudo element, 53 00:02:54,220 --> 00:02:58,490 which again is not actually an element in the HTML, 54 00:02:58,490 --> 00:03:02,680 but it as if it was an element that we can select, 55 00:03:02,680 --> 00:03:04,930 and then style right here. 56 00:03:04,930 --> 00:03:05,763 Okay. 57 00:03:05,763 --> 00:03:07,903 But this one here is not that interesting. 58 00:03:08,750 --> 00:03:11,720 So let's remove it and let's try another one, 59 00:03:11,720 --> 00:03:13,870 which is first-line. 60 00:03:13,870 --> 00:03:17,980 For example, let's try to select all the paragraphs, 61 00:03:17,980 --> 00:03:22,980 and then in there, select and style the very first line. 62 00:03:23,634 --> 00:03:26,630 And let's say we actually wanted to color to be red, 63 00:03:26,630 --> 00:03:27,823 just as a demo. 64 00:03:28,850 --> 00:03:33,360 And so you'll see that actually worked just fine. 65 00:03:33,360 --> 00:03:36,270 So this is a paragraph and it is the first line. 66 00:03:36,270 --> 00:03:37,580 So it's red. 67 00:03:37,580 --> 00:03:38,550 The same here. 68 00:03:38,550 --> 00:03:42,463 The same here and here and here and really everywhere. 69 00:03:43,930 --> 00:03:45,250 Right? 70 00:03:45,250 --> 00:03:48,820 Now let me actually show you another new selector 71 00:03:48,820 --> 00:03:50,380 that you don't know yet, 72 00:03:50,380 --> 00:03:53,100 which is the adjacent element selector 73 00:03:53,100 --> 00:03:56,330 or the adjacent sibling selector. 74 00:03:56,330 --> 00:03:59,970 So a sibling element is basically an element 75 00:03:59,970 --> 00:04:03,170 that is part of the same parent. 76 00:04:03,170 --> 00:04:05,453 So for example, here, 77 00:04:06,520 --> 00:04:10,280 this P is a sibling of this one and of this one 78 00:04:10,280 --> 00:04:13,450 and of this one and all these other ones, 79 00:04:13,450 --> 00:04:16,550 because they are all inside of the same container, 80 00:04:16,550 --> 00:04:18,970 which is in this case, this article. 81 00:04:18,970 --> 00:04:20,200 Right. 82 00:04:20,200 --> 00:04:23,173 Now, the adjacent sibling is a sibling 83 00:04:23,173 --> 00:04:26,370 that is actually the very next element. 84 00:04:26,370 --> 00:04:27,420 So for example, 85 00:04:27,420 --> 00:04:32,420 the adjacent sibling of this H3 is this paragraph here. 86 00:04:33,010 --> 00:04:33,850 Okay. 87 00:04:33,850 --> 00:04:35,880 So basically the adjacent element 88 00:04:35,880 --> 00:04:38,863 is the sibling that comes right after it. 89 00:04:40,880 --> 00:04:43,533 And there's actually a selector for that. 90 00:04:44,540 --> 00:04:47,463 So what I want to do is to only select the paragraphs 91 00:04:47,463 --> 00:04:49,557 that come after the H3s. 92 00:04:50,580 --> 00:04:54,040 So that's going to be this one and this one. 93 00:04:54,040 --> 00:04:55,640 Okay. 94 00:04:55,640 --> 00:05:00,483 So let's say H3 and then plus. 95 00:05:01,390 --> 00:05:05,600 So the plus here is the adjacent sibling selector. 96 00:05:05,600 --> 00:05:09,880 So if we save that now, then you'll see that in fact, 97 00:05:09,880 --> 00:05:13,763 only the paragraphs that are immediately after the H3, 98 00:05:14,690 --> 00:05:17,750 so this one and this one, have been selected. 99 00:05:17,750 --> 00:05:19,440 And then in there, of course, 100 00:05:19,440 --> 00:05:23,760 only the first line has actually been selected and styled. 101 00:05:23,760 --> 00:05:25,270 Okay. 102 00:05:25,270 --> 00:05:27,340 But that's actually turned us off. 103 00:05:27,340 --> 00:05:29,120 It's not that helpful, 104 00:05:29,120 --> 00:05:30,810 but I still want to give you the reference 105 00:05:30,810 --> 00:05:32,180 here of first-line 106 00:05:32,180 --> 00:05:34,820 and maybe even more importantly, 107 00:05:34,820 --> 00:05:37,040 of the adjacent sibling selector, 108 00:05:37,040 --> 00:05:41,000 which in some cases is actually quite important. 109 00:05:41,000 --> 00:05:41,930 All right. 110 00:05:41,930 --> 00:05:45,740 But now let's actually use the probably most used 111 00:05:45,740 --> 00:05:48,340 and most important pseudo element, 112 00:05:48,340 --> 00:05:52,700 which are the after and the before pseudo elements. 113 00:05:52,700 --> 00:05:57,043 So the after pseudo element creates a pseudo element, 114 00:05:57,043 --> 00:06:00,610 that will automatically be the very first child 115 00:06:00,610 --> 00:06:02,820 of the selected element. 116 00:06:02,820 --> 00:06:05,740 And I'm sure that that sounds quite strange, 117 00:06:05,740 --> 00:06:07,990 but this can actually be very useful 118 00:06:07,990 --> 00:06:10,540 for some small cosmetic style 119 00:06:10,540 --> 00:06:14,500 for which we don't want to necessarily add a new element 120 00:06:14,500 --> 00:06:16,090 to the HTML. 121 00:06:16,090 --> 00:06:18,600 So let me show you what I mean by that. 122 00:06:18,600 --> 00:06:22,750 And, it's easiest to show you in the demo. 123 00:06:22,750 --> 00:06:27,750 So what I'm talking about is this yellow, small thing here. 124 00:06:27,790 --> 00:06:30,733 Let's give us some more space so we can actually see it. 125 00:06:31,630 --> 00:06:35,480 So essentially I'm adding this small cosmetic style here. 126 00:06:35,480 --> 00:06:39,223 So simply saying that this is a top article. 127 00:06:40,120 --> 00:06:40,970 All right. 128 00:06:40,970 --> 00:06:43,480 And so for this very small, 129 00:06:43,480 --> 00:06:44,740 let's say thing, 130 00:06:44,740 --> 00:06:49,320 we don't need to add a whole new element into our HTML. 131 00:06:49,320 --> 00:06:51,880 I mean, of course we could do that, 132 00:06:51,880 --> 00:06:53,530 but this is a good use case 133 00:06:53,530 --> 00:06:58,330 to show you the before or the after a pseudo elements. 134 00:06:58,330 --> 00:06:59,163 All right. 135 00:07:00,030 --> 00:07:02,853 Let's put it back and go back here. 136 00:07:03,950 --> 00:07:05,850 And so, yeah, 137 00:07:05,850 --> 00:07:08,590 so remember that this element here, 138 00:07:08,590 --> 00:07:11,610 is close to this a H1 here. 139 00:07:11,610 --> 00:07:13,000 And so what we will do 140 00:07:13,000 --> 00:07:16,690 is to create the after a pseudo element, 141 00:07:16,690 --> 00:07:17,963 basically after the H1. 142 00:07:20,260 --> 00:07:22,360 So, I will just write the code 143 00:07:22,360 --> 00:07:24,783 and then it will be a bit easier to understand. 144 00:07:25,880 --> 00:07:28,393 So colon colon, and then after. 145 00:07:30,230 --> 00:07:31,573 And now the first property 146 00:07:31,573 --> 00:07:35,743 that is mandatory to specify here is the content property. 147 00:07:37,420 --> 00:07:39,020 So we specify content 148 00:07:39,020 --> 00:07:41,780 and then here we need to write something. 149 00:07:41,780 --> 00:07:44,640 And it can actually just be an empty string. 150 00:07:44,640 --> 00:07:48,770 So just this empty text like this. 151 00:07:48,770 --> 00:07:50,543 But in this case we want top. 152 00:07:51,410 --> 00:07:52,243 Okay. 153 00:07:52,243 --> 00:07:54,090 But even if you don't want any texts 154 00:07:54,090 --> 00:07:55,310 in your pseudo elements, 155 00:07:55,310 --> 00:07:58,790 you still have to define the content property. 156 00:07:58,790 --> 00:08:00,262 And actually at this point, 157 00:08:00,262 --> 00:08:03,973 the pseudo elements should already be visible in our page. 158 00:08:05,560 --> 00:08:07,113 So let's give it a try. 159 00:08:09,380 --> 00:08:11,563 And it looks like it's not there yet. 160 00:08:14,300 --> 00:08:17,313 But let's figure out right here. 161 00:08:18,440 --> 00:08:20,970 Oh, and actually it is here. 162 00:08:20,970 --> 00:08:23,073 You see that it's here in the H1. 163 00:08:24,180 --> 00:08:26,373 So we want it in the H2 actually. 164 00:08:27,930 --> 00:08:31,330 And there it is. 165 00:08:31,330 --> 00:08:34,180 So there is this element that we just created 166 00:08:34,180 --> 00:08:36,280 and we will style it in a little bit 167 00:08:36,280 --> 00:08:39,370 because like this, it doesn't make a lot of sense. 168 00:08:39,370 --> 00:08:41,490 But here you can actually see it, 169 00:08:41,490 --> 00:08:43,560 even in the dev tools, 170 00:08:43,560 --> 00:08:46,590 and as you hover it, it is right there. 171 00:08:46,590 --> 00:08:47,423 Okay. 172 00:08:47,423 --> 00:08:49,593 But that's no stylet a little bit further. 173 00:08:50,520 --> 00:08:54,053 Let's give it some background color. 174 00:08:55,900 --> 00:08:58,440 I'm going to use some nice yellow with this code here. 175 00:08:58,440 --> 00:09:02,203 F F E seven zero E. 176 00:09:03,520 --> 00:09:05,010 All right. 177 00:09:05,010 --> 00:09:08,493 And so now this looks more like a real element. 178 00:09:10,310 --> 00:09:14,750 Then we can also change the font size, for example, 179 00:09:14,750 --> 00:09:16,193 we can make it bold. 180 00:09:20,530 --> 00:09:22,560 So let's see. 181 00:09:22,560 --> 00:09:25,003 And that looks a little bit nicer already. 182 00:09:25,880 --> 00:09:27,793 And now let's give it some padding. 183 00:09:29,100 --> 00:09:30,740 Now by default, 184 00:09:30,740 --> 00:09:34,570 any pseudo element is actually an inline element. 185 00:09:34,570 --> 00:09:37,440 And so if we want to give it any padding, 186 00:09:37,440 --> 00:09:40,600 we want the box model to apply to it normally. 187 00:09:40,600 --> 00:09:41,770 Right? 188 00:09:41,770 --> 00:09:43,210 And so in order to do that, 189 00:09:43,210 --> 00:09:46,813 we need to render this element as an inline block box. 190 00:09:48,190 --> 00:09:50,010 So display, 191 00:09:50,010 --> 00:09:51,960 inline block. 192 00:09:51,960 --> 00:09:54,710 And so this is actually one of the great use cases 193 00:09:54,710 --> 00:09:56,720 of using inline block. 194 00:09:56,720 --> 00:09:58,963 And so take a note of that, maybe. 195 00:10:00,150 --> 00:10:01,880 Now let's add some padding here. 196 00:10:01,880 --> 00:10:03,930 Let's say five pixels to the top 197 00:10:05,000 --> 00:10:07,833 and ten pixels to the sides. 198 00:10:09,180 --> 00:10:10,470 Nice. 199 00:10:10,470 --> 00:10:12,630 So that's already looking quite good. 200 00:10:12,630 --> 00:10:16,340 But now we need to add the final piece of the puzzle, 201 00:10:16,340 --> 00:10:20,273 which is to actually position it in a meaningful place. 202 00:10:21,420 --> 00:10:25,845 So notice how right here, the element is like, 203 00:10:25,845 --> 00:10:29,000 kind of at the end of the element. 204 00:10:29,000 --> 00:10:32,683 So at the end, and half of the element is outside of it. 205 00:10:34,580 --> 00:10:37,350 So while here, in our example, 206 00:10:37,350 --> 00:10:40,085 let's give, our H2, 207 00:10:40,085 --> 00:10:43,440 just temporarily a background color here, 208 00:10:43,440 --> 00:10:45,143 so we can see what's happening. 209 00:10:46,920 --> 00:10:48,283 So background color, 210 00:10:49,320 --> 00:10:50,153 orange. 211 00:10:51,690 --> 00:10:52,570 Okay. 212 00:10:52,570 --> 00:10:57,110 And so now where we want this pseudo element to be located, 213 00:10:57,110 --> 00:10:58,853 is here a bit outside. 214 00:10:59,730 --> 00:11:02,650 So first let's put it here in this corner, 215 00:11:02,650 --> 00:11:05,770 and then from that we will move it outside. 216 00:11:05,770 --> 00:11:08,593 So how do you think we can achieve that? 217 00:11:09,580 --> 00:11:14,040 Well, the answer to that is absolute positioning. 218 00:11:14,040 --> 00:11:14,873 All right. 219 00:11:15,800 --> 00:11:18,400 So the third thing that we need to do 220 00:11:18,400 --> 00:11:21,260 in order to absolutely position an element, 221 00:11:21,260 --> 00:11:23,660 is to first give the parent element, 222 00:11:23,660 --> 00:11:25,630 inside of which we want, 223 00:11:25,630 --> 00:11:29,560 actually the positioning to happen, the position relative. 224 00:11:29,560 --> 00:11:30,770 Remember that? 225 00:11:30,770 --> 00:11:31,790 And so in this case, 226 00:11:31,790 --> 00:11:34,243 that's going to be this H2 element. 227 00:11:35,610 --> 00:11:39,130 So position relative, 228 00:11:39,130 --> 00:11:42,203 and now we are ready to absolutely position this element. 229 00:11:43,780 --> 00:11:46,033 So position absolute. 230 00:11:47,690 --> 00:11:50,083 And let's put it at the top. 231 00:11:51,090 --> 00:11:54,940 And just to test it for now, let's put on the left. 232 00:11:54,940 --> 00:11:57,023 So this will be the top left corner. 233 00:11:58,350 --> 00:12:01,380 And indeed that worked beautifully. 234 00:12:01,380 --> 00:12:03,260 It's right here. 235 00:12:03,260 --> 00:12:04,900 Just notice what happened, 236 00:12:04,900 --> 00:12:08,433 if we turned off the position, relative here in the H2, 237 00:12:10,040 --> 00:12:13,140 then this would immediately move up here, 238 00:12:13,140 --> 00:12:15,213 to the very top of the page. 239 00:12:16,080 --> 00:12:16,913 Right? 240 00:12:16,913 --> 00:12:20,780 And so that's why we can never forget to position relative 241 00:12:20,780 --> 00:12:22,110 on the parent element, 242 00:12:22,110 --> 00:12:24,793 inside of which we want this to happen. 243 00:12:26,260 --> 00:12:28,953 But now we want it here at the right side. 244 00:12:30,700 --> 00:12:32,210 So right here. 245 00:12:32,210 --> 00:12:35,610 And now let's actually move it out a little bit. 246 00:12:35,610 --> 00:12:39,310 So move it up and move it to the right. 247 00:12:39,310 --> 00:12:40,143 Okay. 248 00:12:40,143 --> 00:12:41,810 And the reason why I'm doing that, 249 00:12:41,810 --> 00:12:43,490 is so that I can show you something 250 00:12:43,490 --> 00:12:46,020 that we haven't also talked about yet, 251 00:12:46,020 --> 00:12:47,863 which is negative length. 252 00:12:48,840 --> 00:12:53,170 So if we specify it here, 25 pixels to the right, 253 00:12:53,170 --> 00:12:55,260 it would move from the right, 254 00:12:55,260 --> 00:12:58,660 here in this direction to the left, basically. 255 00:12:58,660 --> 00:12:59,493 Right? 256 00:12:59,493 --> 00:13:03,470 So 25 pixels from the right into this direction. 257 00:13:03,470 --> 00:13:06,010 However, if we set a negative value, 258 00:13:06,010 --> 00:13:08,730 it will move in the opposite direction. 259 00:13:08,730 --> 00:13:12,030 And so now it is right here. 260 00:13:12,030 --> 00:13:16,970 So outside of the H1 while, at least partially 261 00:13:16,970 --> 00:13:18,350 Right? 262 00:13:18,350 --> 00:13:20,863 So not the H1, but the H2, of course. 263 00:13:21,820 --> 00:13:23,610 Then at the top, let's do the same. 264 00:13:23,610 --> 00:13:26,723 Let's say minus 10 pixels. 265 00:13:28,140 --> 00:13:31,193 And it could be even a bit more, I guess. 266 00:13:32,420 --> 00:13:35,903 Let's say minus 15. 267 00:13:37,560 --> 00:13:39,110 And so that looks a bit better. 268 00:13:40,130 --> 00:13:41,197 Okay. 269 00:13:41,197 --> 00:13:45,706 And so now we can get actually rid of this one here. 270 00:13:45,706 --> 00:13:46,713 And there we go. 271 00:13:47,820 --> 00:13:50,510 So that looks just like this one. 272 00:13:50,510 --> 00:13:51,720 Right? 273 00:13:51,720 --> 00:13:53,720 Well, it's a bit different. 274 00:13:53,720 --> 00:13:57,390 This one is a bit more up, so we can move it back down. 275 00:13:57,390 --> 00:13:58,740 Let's say 10. 276 00:13:58,740 --> 00:14:01,690 And also the color is black. 277 00:14:01,690 --> 00:14:03,573 So let's do that here. 278 00:14:05,260 --> 00:14:08,960 And let's stay consistent and use hexadecimal. 279 00:14:08,960 --> 00:14:10,710 And so to make it black, 280 00:14:10,710 --> 00:14:13,343 it's zero, zero and zero all the way. 281 00:14:14,650 --> 00:14:18,603 And so now let's see, that that looks exactly the same. 282 00:14:19,560 --> 00:14:23,280 But the only difference that it's actually four, four, four. 283 00:14:23,280 --> 00:14:25,580 But that doesn't really matter. 284 00:14:25,580 --> 00:14:26,630 And once again, 285 00:14:26,630 --> 00:14:29,740 this element that we just created and styled, 286 00:14:29,740 --> 00:14:31,230 does exist here, 287 00:14:31,230 --> 00:14:33,500 kind of in the HTML three 288 00:14:33,500 --> 00:14:35,640 that we can see here in the Def tools. 289 00:14:35,640 --> 00:14:38,490 But of course in our own HTML, 290 00:14:38,490 --> 00:14:42,500 it is nowhere to be found here, close to this H2. 291 00:14:42,500 --> 00:14:43,570 Right. 292 00:14:43,570 --> 00:14:46,560 So CSS, once we declare it here, 293 00:14:46,560 --> 00:14:48,430 will then automatically create it, 294 00:14:48,430 --> 00:14:52,290 and we'll put it here so that we can style it. 295 00:14:52,290 --> 00:14:54,900 So the styles of course, then appear down here 296 00:14:54,900 --> 00:14:56,690 in the styles panel, 297 00:14:56,690 --> 00:15:00,873 and here are the usual values of the box model. 298 00:15:03,650 --> 00:15:04,760 Okay. 299 00:15:04,760 --> 00:15:09,760 And so this is how we work with pseudo elements in HTML. 300 00:15:10,270 --> 00:15:13,380 Now there was also the before. 301 00:15:13,380 --> 00:15:16,480 But actually that would look exactly the same way. 302 00:15:16,480 --> 00:15:17,520 The difference is that 303 00:15:17,520 --> 00:15:21,950 after will basically become the very last child element 304 00:15:21,950 --> 00:15:24,110 of the one that we are selecting here, 305 00:15:24,110 --> 00:15:27,673 while before we'll become the very first child element. 306 00:15:28,870 --> 00:15:31,610 So if we changed this here to before, 307 00:15:31,610 --> 00:15:34,260 then you'll see that here, it switched position. 308 00:15:34,260 --> 00:15:36,380 But since we are positioning this element 309 00:15:36,380 --> 00:15:38,220 in an absolute way, 310 00:15:38,220 --> 00:15:41,710 that doesn't matter at all, how the result looks like. 311 00:15:41,710 --> 00:15:44,200 But since we are positioning this pseudo element 312 00:15:44,200 --> 00:15:46,460 in an absolute way, anyway, 313 00:15:46,460 --> 00:15:48,470 it doesn't change how it looks like, 314 00:15:48,470 --> 00:15:50,893 no matter if we use after or before. 315 00:15:51,800 --> 00:15:52,660 Nice. 316 00:15:52,660 --> 00:15:54,540 So with this, 317 00:15:54,540 --> 00:15:59,470 we actually finished this part of the CSS fundamentals. 318 00:15:59,470 --> 00:16:04,470 So great job, and well done for still being with me here, 319 00:16:05,080 --> 00:16:08,970 even as the content is getting a little bit more complex, 320 00:16:08,970 --> 00:16:11,590 and maybe a little bit harder to understand. 321 00:16:11,590 --> 00:16:14,540 But that's just part of the learning journey. 322 00:16:14,540 --> 00:16:17,900 And so just make sure that you really understand everything 323 00:16:17,900 --> 00:16:20,550 that I show you here by practicing. 324 00:16:20,550 --> 00:16:23,653 And by always reviewing the code for each lecture. 325 00:16:24,550 --> 00:16:25,860 Now the next two lectures 326 00:16:25,860 --> 00:16:28,530 will be about some developer skills 327 00:16:28,530 --> 00:16:29,960 that are important for you 328 00:16:29,960 --> 00:16:32,800 as you start your journey as a web developer. 329 00:16:32,800 --> 00:16:34,070 And then after that, 330 00:16:34,070 --> 00:16:37,310 we have one final coding challenge for the section, 331 00:16:37,310 --> 00:16:40,120 so that you can practice what we just learned 332 00:16:40,120 --> 00:16:43,030 over these last couple of videos. 333 00:16:43,030 --> 00:16:45,920 So for the next few videos are very important, 334 00:16:45,920 --> 00:16:47,960 and very exciting, I think. 335 00:16:47,960 --> 00:16:49,803 And so see you there soon. 23502

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