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 How to Make a Website Adding Pages to a Website Add a New Page

Matthew Clark
Matthew Clark
7,255 Points

Why are my icons still big for social media links? My code is below for both HTML and CSS

CSS .social-icon { width: 20px; height: 20px; margin: 0 5px; }

HTML <a href="http://twitter.com/Matt_Clark85"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="https://www.facebook.com/profile.php?id=100004163915382"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>

2 Answers

Make sure you put the class in the links on the HTML page and then the correct CSS

<a href="yourlink"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
<a href="yourlink"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>

CSS page

footer {
  font-size: 0.75em;
  text-align: center;
  clear: both;
  padding-top: 50px;
  color: #ccc;
}

.social-icon {
  width: 20px;
  height: 20px;
  margin: 0 5px;
}

Then this should be your CSS page.

Luke Lee
Luke Lee
7,577 Points

Can't see the html code?