Why isn't the border and background color going all the way to the sides?

I want to have the border go all the way to the sides and have the background color completely fill the header with no white space.

You can set the margin of the body to zero. Im not sure I understand your other requirement.

Try and follow →

html, body {
 margin:0;  /*will remove the margin*/
h2 {
 margin-top: 0; /*remove top-margin (white space above your element)*/

set the margin to be zero pixels auto or try doing justify-content : center;

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.