Footer: cannot get background color to extend to full width

Hello,

See this link for the codepen. I’ve labeled the sections I am working on in html and css “FOOTER”.

I cannot get the div to reach full width or full height. I was able to do it with the header by using position: fixed, and then right, left, top: 0px. Shouldn’t I be able to use the same idea here even though position is relative?

Thank you!

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15

CSS

Challenge: Build a Product Landing Page

Link to the challenge:

You could try this at the top of your CSS, but you will have to make adjustments elsewhere afterward:

* {
  margin: 0;
  box-sizing: border-box;
}

When you say at the top of my css do you mean the body or the particular div i am working on?

The * is a selector that selects everything. I just meant to put it at the top because it makes sense intuitively.

That worked. Thank you!

1 Like