CSS CSS Layout Basics Getting Started with CSS Layout Centering Page Content and Creating a Full-width Header

Why is it necessary to add a class to the header? Can just style header tag

Why is it necessary to add a class to the header? you can omit the class and just target the header tag in css so wondering why you added a class to it? Thanks

2 Answers

walter palma
walter palma
3,189 Points

You can, but you can have more than one header and you probably dont want every header with the same style :)

Matt WebDev218
seal-mask
.a{fill-rule:evenodd;}techdegree
Matt WebDev218
Front End Web Development Techdegree Student 4,614 Points

You want the header to be 100% width, but all the content of the header to be inline with main content of the page. That way the headers background styling extends the full width of the screen.