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

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!