‫Hey, there.
‫Welcome back.
‫Show them their side in this lecture.
‫Let us discuss one important point regarding margin auto as a less vexed ally in saying that I if you
‫remember we used margin auto here to center our image, and now in the previous lecture, we use text
‫line center to center buttons.
‫Why we're using two different concepts just to center things.
‫Also, why this is an important interview question.
‫It's also an important question on StackOverflow.
‫Why so much hype over this particular topic and why I'm creating a separate lecture over this?
‫So let's discuss about this and clear out.
‫So there are two concepts, I guess.
‫You know both of them now.
‫There is a concept called Text Align Center, and the task is to center things and then we have margin
‫auto divide things equally.
‫Now, let's come to the point.
‫Why do we have to go on to say, if you read this answer carefully, you will.
‫You don't need towards this lecture, to be honest.
‫Text align center with center the contents of the container, OK, while margin auto will center the
‫container itself.
‫Now let me give you an idea here with our image.
‫We use margin auto, and when we use margin auto, we are basically centering the we are basically aligning
‫the content, the block itself, the container itself.
‫So this is a display block that means we are aligning this content at center.
‫I hope you got the idea now, whereas if I discuss an extra line center here, if I select the death,
‫it is going to align the item inside this debate as.
‫Read this again, I read this one again from M.D. is not the text line ceases property set horizontal
‫alignment optic content inside a block element are able sandbox.
‫So that means if I add the extra line center to this device, that means the element inside that there
‫will be center.
‫Whereas if I say margin auto, it will sink there or it will divide the margin for that container itself,
‫not the item, but the container itself.
‫So I hope you got the idea at an important question, to be honest.
‫I just read this again and it will play out.
‫Thank you for following.
‫I hope now you understand when to use margin auto and when to use extra line center.
‫OK, thank you for calling and I see you guys in the next one.