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

HTML Introduction to HTML and CSS Make It Beautiful With CSS Adding a Style to several Elements using Class

What am I missing on the add padding challenge?

I keep getting a "bummer" response saying I need to add padding to the class. What could I be missing?

<!doctype html>
    <title>List Example</title>
    <link rel="stylesheet" href="styles.css">

    <a class="social-links"href="#">Follow me on Twitter!</a>
    <a class="social-links"href="#">Send me an Email!</a>



2 Answers

When you define CSS class attributes, don't put the word class, just start it with the period. The only exception to this is when you are adding attributes for a class on a specific element, in which case you would put the element name followed by a dot and the class name, like a.social-links, but that isn't necessary here. (Incidentally, that's why the earlier task passed, because the test rule was probably only looking for a dot followed by social-links and a set of curly braces, without caring what you had before the class name. In the last task, it wants to make sure that the attributes are being applied either to all elements with the class name (.social-links) or to the anchor tags with the class (a.social-links). Note that I did not test the last one, but it should work.

Thank you so much! I appreciate your time and answer, that worked.