Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS How to Make a Website Styling Web Pages and Navigation Style the Image Captions

Problem Centering Footer

I see the footer in the video is centered properly, and although my footer section is written the same when I put in the "the clear: both;" it moves the footer back to the left side.

footer { font-size: 0.75em text-align: center; clear: both; padding-top: 50px; color: #ccc;
}

Here is what I have written for that section.

Is the clear property clearing the text-align? or is it something else?

Thanks!

1 Answer

Hi Robert,

It looks like you're missing a semi-colon after font-size: 0.75em

See where you're at after adding that in.

The clear property is to clear the floated items that come before it so that the footer will appear below those floated elements and not to the side of them. It doesn't have any effect on text-align.

Awesome, thanks so much! I can't beilive I missed that, but I glad it wasn't something bigger :)

You're welcome