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 Styling Web Pages and Navigation Polish the Navigation and Footer

Richard Getz
Richard Getz
2,640 Points

Social Icons are not down sizing

So I've been following along with Nick's course, which is very detailed and excellent. However, Whenever I declared the class social-icon for my social links, then changed them to:

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

then save, then refresh the page, the icons are still big. Why?????

3 Answers

Matthew Tran
Matthew Tran
16,343 Points

Something I see wrong with the code is that nick is sizing the icons, not the actual links. So instead of seleting .social-links, he calls it .social-icons . My code for the program looks like this:

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

If the social links are a class you would want a period before the social links (.social-links) .. are you able to post your code so we can get a better look?

Richard Getz
Richard Getz
2,640 Points

Hey Brian, left my house not too too long ago. Do I add the . to my CSS file or the HTML file?? And how do I post my code?

So on your css file, where you are calling the social links, you want to put (.social-links {width:20px} ) sorry if I'm not explaining that to you in better detail :( .. I hope that makes since.. instead of just doing (social-links {width:20px} )

Richard Getz
Richard Getz
2,640 Points

It's fine. When I get home, I'll give it a shot. Been working 3 jobs for the past month and it's been a bit rough