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 trialColten Rowland
335 PointsCSS 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
10,615 PointsThe system works fine. The answer to question one is
a {text-decoration:none}
Spencer Merritt
10,615 PointsThe answer to 2 is
#wrapper {max-width:940px; margin:0 auto;}
Colten Rowland
335 PointsThis is exactly what I typed.
Colten Rowland
335 PointsOK. 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
10,615 PointsYour missing the # before wrapper. It should read #wrapper.
Lucas Santos
19,315 PointsYou 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
335 PointsNo. 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
335 PointsCan 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
19,315 Pointsedit 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
335 PointsBacktick? 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
335 PointsStill didn't work I see.
Spencer Merritt
10,615 PointsI just gave you the answers
Colten Rowland
335 PointsSelect 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
335 PointsStill didn't work after hand typing it.
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
335 PointsSelect 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
335 PointsSelect 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
335 PointsThere we go! Thank you! I never expected to have to do that.
Spencer Merritt
10,615 PointsQuit asking the question over and over. I just gave you the answers to the quiz!!
Colten Rowland
335 PointsThanks guys! I'm a newbie. I'm getting there.