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

Stage 4 of CSS: Cascading Style Sheets: Challenge Task 2 of 3

I keep getting an error for the Margin Value. Here is what I've inputted:

a{ text decoration: none; }

wrapper{

max-width: 940 px; margin: 0 auto; }

I've also tried just 0 and just auto for Margin.

Please note I did input a "#" before "wrapper.

5 Answers

William Li
PLUS
William Li
Courses Plus Student 26,868 Points

I've cleaned up the code a bit for you. Basically 2 issues here.

  1. as jason pointed out, it's text-decoration
  2. no space between 940 and px
a{
   text-decoration: none;
}

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

text decoration should be text-decoration

I apologize for the errors inputted in my initial post. This is exactly what I have written:

Challenge Task 1 of 3: Remove the underlines from all the links on the page (I got this one correct):

a { text-decoration: none; }


Challenge Task 2 of 3: 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: 940 px; margin: 0 auto; }

This is the error I keep seeing for Challenge Task 2 of 3 Bummer! Check the max-width value in your CSS.

William, I just tried entering "940px" vs "940 px". Problem solved :). Thank you both SO much!

William Li
William Li
Courses Plus Student 26,868 Points

also, Stephanie, for reference, you can post with code properly highlighted by wrapping it around in Markdown syntax like such

Code block on Treehouse

That way the code you post will not have the issue of missing a character here and there. Hope it helps.

got it, thank you for the useful information, you rock!