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

HTML Introduction to HTML and CSS (2016) Make It Beautiful With CSS Select and Style by Element

In the CSS file, use the class to give both <a> tags 15px of padding and 10px of margin.

In the CSS file, use the class to give both <a> tags 15px of padding and 10px of margin.

4 Answers

In order to complete you have to grab the class ( <a class="This is what needs to be in the css">and then style it. REMEMBER to put a period before the class name in CSS (and a "#" for IDs.)

.nameOfClass {
padding: 15px;
margin: 10px;
}
ireniusmhemba
ireniusmhemba
397 Points

.a { padding: 15px; margin: 10px; }

John Lack-Wilson
John Lack-Wilson
8,181 Points

a { padding: 15px; margin: 10px; }

The above will apply to all links in your site. (pre-pending with a full stop means it is a class, therefore you would have to add a class of "a" to each.