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 Adding a Style to several Elements using Class

i think i got the right code for padding but its still an error

please help

index.html
<!doctype html>
<html>
  <head>
  </head>
  <body>

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

  </body>
</html>
styles.css
.main-pg {
  border: 4px; 
  border-style: solid;
  border-color: red; 
}
.social-links {
    padding: 15px;
  margin: 10px;
}

3 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Hi Steven,

Everything you have is correct. And while the indented line doesn't look nice, it won't affect the styling of the page or whether the challenge passes or not (Whitespace, for the most part, is irrelevant in CSS and HTML, and the Code Checker will not return a Bummer for it).

The problem here is that you deleted some code in the HTML file that was there when the challenge loaded. You deleted the code the was between the <head> tags. Considering these lines included the link to the style sheet, the code checker caught that error and returned the Bummer!

Just restart the challenge so all the lines are back and paste in what you've got.
And to keep things neat, you could remove that indent. :smirk:

Nice work! :dizzy:

Adam Pengh
Adam Pengh
29,881 Points

You do have the right code, it might be the .main-pg class or the extra indent on the padding rule. Treehouse is dumb like that sometimes.

Thank you

Remove the extra indent these practice courses are very specific about how to they want the code to be placed.

Thank you very much :D