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!
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
Andrew Taylor
11,500 PointsI can't access my class in CSS
Hey Everyone,
I have some html>> <!--
<footer class="social">
<a href="http://www.facebook.com"><img src="" alt="facebook logo" </a>
<a href="http://www.twitter.com" alt="twitter logo"><img src="" alt"" </a>
</footer>
--->
And some CSS footer.social{ width:202px; height:20px; margin:0 5px; }
But the CSS won't change the html class. It's like it's not linked up. Has anyone got any ideas? Am I referencing it wrong?
Thanks Theador
3 Answers

Hector Castillo
2,620 PointsHi Andrew,
After adjusted the img tags like Robert showed you try remover the word "footer" after ".social" in your CSS code so it reads.....
.social {width: 202px; height: 20px; margin: 0 5px;}
I believe you don't need to select the element "footer" because you gave it a class name of "social"
Hope this helps.

Robert Richey
Courses Plus Student 16,352 PointsHi Andrew,
Your img
tags aren't closing.
<img src="" alt="facebook logo" </a>
/* needs to be */
<img src="" alt="facebook logo"></a>
/* don't forget the other image tag */

Andrew Taylor
11,500 PointsI have re-adjusted it but it still doesn't seem to work :S
<footer class="social">
<a href="http://www.facebook.com"><img src="http://placehold.it/50x50" alt="facebook logo"> </a>
<a href="http://www.twitter.com" alt="twitter logo"><img src="http://placehold.it/50x50" alt""> </a>
<p>© 2014 Andy Taylor</p>
</footer>
footer.social{ width:202px; height:20px; margin:0 5px; }
I have put the width to an extreme so I can see if it is working. I think I am referencing it wrong.

Andrew Taylor
11,500 PointsYer footer.social worked but I can use just .social too. The thing I was missing was a * so it was .social*{}