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 CSS: Cascading Style Sheets Style the Basic Elements

Colten Rowland
Colten Rowland
335 Points

CSS problem

What am I doing wrong here?

Select the ID wrapper, set it to a max width of 940 pixels, and then center it on the page using the margin property.

wrapper {

max-width: 940px; margin: 0 auto; } a { text-decoration: none; }

14 Answers

Spencer Merritt
Spencer Merritt
10,615 Points

The system works fine. The answer to question one is

a {text-decoration:none}
Spencer Merritt
Spencer Merritt
10,615 Points

The answer to 2 is

#wrapper {max-width:940px; margin:0 auto;}
Colten Rowland
Colten Rowland
335 Points

This is exactly what I typed.

Colten Rowland
Colten Rowland
335 Points

OK. I finally got it to work. I put it all on one like like you have it. I'm use to doing it like below. '''

wrapper {

max-width: 940px; margin:0 auto; } ''' For some reason it wouldn't work for me like that. I don't know why.

Spencer Merritt
Spencer Merritt
10,615 Points

Your missing the # before wrapper. It should read #wrapper.

Lucas Santos
Lucas Santos
19,315 Points

You forgot the # sign which is how you specify that you are targeting an ID and not a Class.

#wrapper {
max-width: 940px;
margin: 0px auto;
text-decoration: none;
}
Colten Rowland
Colten Rowland
335 Points

No. It just doesn't post when I paste the code. I am typing the # for the wrapper ID. I think this system is not working so well.

Colten Rowland
Colten Rowland
335 Points

Can you send and post a photo in this forum. Then you can see that I am posting the #. When I copy and paste it doesn't do such a good job

Lucas Santos
Lucas Santos
19,315 Points

edit your code on top you just probably forgot to add a backtick ` (you need 3 backticks before and after your code for it to show properly)

Colten Rowland
Colten Rowland
335 Points

Backtick? What is a backtick? Below I will attempt to paste it again. But put it in a text editor first, change the formatting to plain text. Copy and paste again. Here is goes.

Select the ID wrapper, set it to a max width of 940 pixels, and then center it on the page using the margin property.

wrapper {

max-width: 940px; margin: 0 auto; } a { text-decoration: none; }

Colten Rowland
Colten Rowland
335 Points

Still didn't work I see.

Colten Rowland
Colten Rowland
335 Points

Select the ID wrapper, set it to a max width of 940 pixels, and then center it on the page using the margin property.

wrapper{

max-width: 940px; margin: 0 auto; } a { text-decoration: none; }

Colten Rowland
Colten Rowland
335 Points

Still didn't work after hand typing it.

Lucas Santos
Lucas Santos
19,315 Points

` that little thing in the beginning of this sentence is a backtick... look below where it says "Markdown Cheatsheet" it will inform you.

Colten Rowland
Colten Rowland
335 Points

Select the ID wrapper, set it to a max width of 940 pixels, and then center it on the page using the margin property. '''# wrapper { max-width: 940px; margin: 0 auto; } a { text-decoration: none; }'''

Colten Rowland
Colten Rowland
335 Points

Select the ID wrapper, set it to a max width of 940 pixels, and then center it on the page using the margin property. '''# wrapper { max-width: 940px; margin: 0 auto; } a { text-decoration: none; }'''

Colten Rowland
Colten Rowland
335 Points

There we go! Thank you! I never expected to have to do that.

Spencer Merritt
Spencer Merritt
10,615 Points

Quit asking the question over and over. I just gave you the answers to the quiz!!

Colten Rowland
Colten Rowland
335 Points

Thanks guys! I'm a newbie. I'm getting there.