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 Style the Basic Elements

Can't see what the issue is with my text-align value?

The code challenge asks me to center the logo using text-align and it appears I have everything correct but it's asking me to check my value. This is what I have:

.logo{ text-align: center; }

Does anyone know what I might be doing wrong? Thanks!

2 Answers

Jonathan Cunniffe
Jonathan Cunniffe
10,276 Points

Hi Tracy,

The code is nearly correct, but the problem is you have used a '.' instead of a hashtag in the selector. When selecting an ID you must use a hashtag, however when selecting a CLASS you must use a '.',

So your code should look like this :

' #logo{ text-align: center; } '

( Without the commas! )

Hope this helps,

  • Jonathan
christopher smith
christopher smith
5,831 Points

Make sure you're using the text-align:center; on the container the image sits in and not the image itself. Haven't done that lesson yet so not sure if that class is for the image or the div that image sits inside. GL!