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

Stanzi Wicht
Stanzi Wicht
1,038 Points

Problems with the classes

I cannot figure out why when I add a class and then try to resize my social icons to be smaller it doesn't work! Can somebody help?

I have my classes added to my HTML like this:

 <a href="www.twitter.com/stanziwicht"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a>
      <a href="https://www.facebook.com/stanzi.wicht?fref=photo"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a>

and in my CSS I formatted it like this: .social-icon { width: 20px; height: 20px; margin: 0 5px; }

But nothing happens. What am I missing?

4 Answers

jdh
jdh
12,334 Points

have you tried including the "a" in the CSS.

For instance:

        ```css
        a .social-icon {

width: 20px; height: 20px; margin: 0 5px; } ```

jdh
jdh
12,334 Points

Can you add the html as well?

Stanzi Wicht
Stanzi Wicht
1,038 Points

WHOOPS I am an idiot. I managed to add the HTML!

Stanzi Wicht
Stanzi Wicht
1,038 Points

That worked! Thank you Jake! I'm very new to this

jdh
jdh
12,334 Points

np happy to help.