CSS CSS Layout Basics Getting Started with CSS Layout Creating a Layout Wrapper

Ashim Poudyal
Ashim Poudyal
Front End Web Development Techdegree Student 3,107 Points

I still dont understand why use wrapper. can someone clarify please!

As in the video, it will create margin on left side and right of the screen but why do that. i do not understand why is wrapper used.

1 Answer

Kishan P
Kishan P
8,842 Points

Hi, Ashim Poudyal

.WRAPPER is just a class name and you can name anything you want but by referring to specific word makes your code cleaner and easy to read. Basically putting your content in a div tag with class wrapper helps your content to get centered and apply margin easy, if u don't use div tag to wrap your content you would have to specificity margin: 0 auto for all the tags to get centered.