﻿1
00:00:00,540 --> 00:00:01,080
‫Hey, there.

2
00:00:01,140 --> 00:00:01,860
‫Welcome back.

3
00:00:01,910 --> 00:00:04,110
‫Show them their side in this lecture.

4
00:00:04,230 --> 00:00:11,670
‫Let us discuss one important point regarding margin auto as a less vexed ally in saying that I if you

5
00:00:11,670 --> 00:00:19,050
‫remember we used margin auto here to center our image, and now in the previous lecture, we use text

6
00:00:19,050 --> 00:00:21,230
‫line center to center buttons.

7
00:00:22,030 --> 00:00:25,860
‫Why we're using two different concepts just to center things.

8
00:00:26,760 --> 00:00:29,550
‫Also, why this is an important interview question.

9
00:00:29,580 --> 00:00:32,550
‫It's also an important question on StackOverflow.

10
00:00:33,000 --> 00:00:38,610
‫Why so much hype over this particular topic and why I'm creating a separate lecture over this?

11
00:00:39,270 --> 00:00:41,790
‫So let's discuss about this and clear out.

12
00:00:42,510 --> 00:00:44,550
‫So there are two concepts, I guess.

13
00:00:44,700 --> 00:00:46,020
‫You know both of them now.

14
00:00:46,380 --> 00:00:53,220
‫There is a concept called Text Align Center, and the task is to center things and then we have margin

15
00:00:53,250 --> 00:00:55,440
‫auto divide things equally.

16
00:00:56,370 --> 00:00:58,130
‫Now, let's come to the point.

17
00:00:58,170 --> 00:01:02,760
‫Why do we have to go on to say, if you read this answer carefully, you will.

18
00:01:03,270 --> 00:01:05,580
‫You don't need towards this lecture, to be honest.

19
00:01:06,180 --> 00:01:15,900
‫Text align center with center the contents of the container, OK, while margin auto will center the

20
00:01:15,900 --> 00:01:17,190
‫container itself.

21
00:01:17,760 --> 00:01:21,690
‫Now let me give you an idea here with our image.

22
00:01:21,960 --> 00:01:30,450
‫We use margin auto, and when we use margin auto, we are basically centering the we are basically aligning

23
00:01:30,450 --> 00:01:34,650
‫the content, the block itself, the container itself.

24
00:01:34,680 --> 00:01:41,610
‫So this is a display block that means we are aligning this content at center.

25
00:01:42,500 --> 00:01:49,010
‫I hope you got the idea now, whereas if I discuss an extra line center here, if I select the death,

26
00:01:49,550 --> 00:01:53,360
‫it is going to align the item inside this debate as.

27
00:01:54,680 --> 00:02:02,750
‫Read this again, I read this one again from M.D. is not the text line ceases property set horizontal

28
00:02:02,750 --> 00:02:08,720
‫alignment optic content inside a block element are able sandbox.

29
00:02:09,170 --> 00:02:16,640
‫So that means if I add the extra line center to this device, that means the element inside that there

30
00:02:16,640 --> 00:02:17,630
‫will be center.

31
00:02:18,230 --> 00:02:25,590
‫Whereas if I say margin auto, it will sink there or it will divide the margin for that container itself,

32
00:02:25,700 --> 00:02:28,280
‫not the item, but the container itself.

33
00:02:29,090 --> 00:02:32,210
‫So I hope you got the idea at an important question, to be honest.

34
00:02:32,720 --> 00:02:36,040
‫I just read this again and it will play out.

35
00:02:37,250 --> 00:02:38,190
‫Thank you for following.

36
00:02:38,210 --> 00:02:43,850
‫I hope now you understand when to use margin auto and when to use extra line center.

37
00:02:44,660 --> 00:02:47,780
‫OK, thank you for calling and I see you guys in the next one.

