Bummer! You must be logged in to access this page.

Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Web Design(HTML/CSS)

Hi, i'm tryna lengthen my header color to fill up the left and right side of the page and not leave any gaps...what property in css do i need to add to execute this?, and how many pixels do you suggest?

my CSS code:

header { background: black; border-color: darkorange; margin: 0 0px;

}

3 Answers

Try giving to your html and body tags a margin: 0 auto;, then you can give to the other divs a margin so they will have the little white space (margins).

could you write a code example?

I made this quick example in jsfiddle hope it helps :) : https://jsfiddle.net/Sr_Decode/k04r1hxh/

link didn't work.

Sorry Dwayne Thomas, that's my fault haha, I've just updated my old jsfiddle name and the link just died, here's the new one: https://jsfiddle.net/rivasethan/k04r1hxh/

Thanks Ethan.