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

It is not working

It is always wrongand im doing it right

Hi ,

Can you post :

  • The question
  • Your Answer

This will see whats wrong . Everything works here as i passed it . You might forget a semi-colon ; , its pretty common : p

1 Answer

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Nathan;

As Aurelian mentioned it is a generally accepted practice on the forum to reference the challenge and task as well as to post the code you are using so that folks can help with the code that should be used. Sometimes there are subtle but highly important differences between the two that can change the code overall and still be valid code, or create a syntax error that isn't valid. Either way most of the challenge engines on Treehouse are looking for something specific so the subtleties can make a big difference.

In looking at your user profile, it looks like you are back at Treehouse after a bit of a break, so Welcome Back!

This particular set of challenges is, in my opinion, very important while learning CSS as it focuses on some of the essential skills in CSS, upon which much is built. Without having a firm grasp of these skills, future CSS courses will be difficult to follow.

So, while it is not recommended that folks simply regurgitate code for challenges, I am feeling a bit generous, so as long as you promise that if you don't understand something you go back and review the video(s) on CSS as, like I said, these are very important CSS ideas.

/**********************************
/ COURSE: How to Make a Wesite
/ Module: CSS: Cascading Style Sheets
/ Challenge: Style the Basic Elements
/ Tasks: 1-3
/*********************************/

/* Task 1:
* Remove the underlines from all the links on the page.
*/

a {
  text-decoration: none;
}

/* Task 2:
* 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
}

/* Task 3:
* Select the element with the ID logo and center the text using text-align.
*/

#logo {
  text-align: center;
}

Please post back if a) it helps, b) it doesn't make sense, or c) you have other questions or comments.

Happy coding,

Ken