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 trialLuzien Mar
707 PointsMargin between my social icons unchanged :(
I can't seem to change the margin between the icons.
html <footer> <a href="http://twitter.com/reneluzienmar"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> <a href="http://facebook.com/luzien"><img src="img/facebook-wrap.png" alt="Facebook Logo" class="social-icon"></a> <p>Ā© 2015 Luzien Mar</p> </footer>
css .social-icon { width: 20px; height: 20px; marin: 0 5px; }
Oziel Perez
61,321 PointsFirst of all, margin is misspelled in the code you provided (so make sure you double check your stylesheet if you copied and pasted this from there). Secondly, "a" tags are displayed as inline elements by default, so the images inside the a tags will not be able to apply the margin because the inline "a" tags are forced to take up only as much space as needed (meaning that it will only display the image tags inside of them by themselves with no margins). What I would do is set the <a> tags to display:inline-block and then adding the margins to the "a" tags themselves like this:
a.social-icon {
display:inline-block;
margin:0 5px;
}
a.social-icon img {
width:20px;
height:20px;
}
as you can see I also added the class "social-icon" to the "a" tags instead so that you can apply the margins to the "a" tags and then apply the dimensions to the "img" tags.
Let me know if this works, I tend to make errors myself but I'm quick to fix up my code :)
2 Answers
Kidist Admasu
11,020 Pointsyou write marin instead of margin
Luzien Mar
707 PointsThanks Kidist, I figured that out just a second ago. Thanks for the quick response
Luzien Mar
707 PointsOziel, my problem has been solved by fixing the misspelled word. I'll also give your suggested tags a try.
Thanks!
Luzien Mar
707 PointsLuzien Mar
707 PointsFigured it out. Easy mistake. Margin was misspelled as marin. Added the g and prob solved. NM! :)