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

Duaa Saif
PRO
Duaa Saif
Pro Student 894 Points

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

What did I do wrong ?

index.html
<!doctype html>
<html>
  <head>
    <title>List Example</title>
    <link rel="stylesheet" href="styles.css">
  </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
.social-links{} class ;
.social-links { 
  padding: 15px ; 
  margin: 10px ;
}

1 Answer

Liam Clarke
MOD
Liam Clarke
Treehouse Moderator 19,187 Points

Hi Duaa

You've done it right in your second class.

You do not need the first class selector

when they mention css class sector, they are just referring to the name of the class itself, in this case .social-links.

.social-links { 
  padding: 15px ; 
  margin: 10px ;
}

I would recommend reviewing the videos that you just watched as this is fairly important to fully understand how to style a website