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 CSS: Cascading Style Sheets Center the Wrapper

David White
PLUS
David White
Courses Plus Student 2,248 Points

css basics: div #wrapper

Looks like I got out of sync with the flow here. I went back one lesson and rewrote the code, and have had no luck getting back on track.

I took screenshots of my site and Nick's, and they don't match. (borders, and color primarily)

Where can I upload these images to help out potential answers?

-related to <div> and naming of same element (<div id="wrapper">, and the lesson took us into editing the .css file. Here's what I have there:

a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
  padding:0 5%;
  background: orange;
}

But previously had:

#wrapper {
  max-width: 940px;
  margin: 0 auto;
}

If not mistaken, the last was supposed to line up image and text elements within the <div>.

Mine didn't, and I double-checked it, so now stuck.

Thanks in advance!

2 Answers

Jean Paiva
Jean Paiva
7,128 Points

If you are using chrome, try the developer tool to see what is going wrong.

David White
PLUS
David White
Courses Plus Student 2,248 Points

Very nice idea, I will try that and let you know what I find.

  • thanks!