Weird padding or margin on left and right side of the footer

Hey guys,

I have a weird padding/margin on left and right sides of my footer (i changed it to the red color so it was visible). I tried to margin:0 and padding:0 every big element on the page but there’s still some space on the sides.

How to get rid of it?

Codepen with the webpage:

This won’t work:

footer {
  clear: both;
  margin: 0;
  padding 0;
  text-align: center;

Hey, there is a margin on the body. You made a typo, you forgot the colon in your css. You have “margin 0;”, should be “margin: 0;”

1 Like

Hi Sebastian,

body has a default margin. You can set its margin to 0 in CSS but I recommend you use Normalize or CSS Reset when coding on CodePen. You’ll find it in CodePen’s CSS settings.

1 Like