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 How to Make a Website Customizing Colors and Fonts Use Color in CSS

how to fit header and footer to full width,

halo there i have got problem with the header and footer, they doesn't fit full width on the screen and there are spaces in the left and right.

can you post the structure of your html document? It would be easier to help you if we know exactly what the markup language is telling the page to look like

2 Answers

Make sure you set them to 100% width and 0 padding and margin. More than likely, the default for either, or a parent is not set to these values.

#header {
width:100%
margin: 0;
padding: 0;
}

In this example, I assume you set an id="header" around the header. If this doesn't work, copy all your code into a blank document and slowly add it back into workspaces one line at a time ensuring you maintain 100% and you can find what is not working. Without the actual code you are using, this is the best answer I can give ya.

sorry philip gales, i tried with the one you suggested but unfortunately it is not working