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 trialJacob Smith
10,926 PointsThe icon .png files don't seem to be formatting to my css declarations. Confused.
When I went to add the icons for the phone, email, and twitter .png files and added css declarations to it it only cut off the pictures more. The icons are cut in half.
Jacob Smith
10,926 Points.contact-info { list-style: none; padding: 0; margin: 0; font-size: 0.9em; }
.contact-info a { display: block; min-height: 20px; background-repeat: no-repeat; background-size: 20px 20 px; padding: 0 0 0 30px; margin: 0 0 10px; }
.contact-info li.phone a { background-image: url('../img/phone.png'); }
.contact-info li.mail a { background-image: url('../img/mail.png') }
.contact-info li.twitter a { background-image: url('../img/twitter.png')
Liam Maclachlan
22,805 PointsCool. Are you using a workspace man?
Jacob Smith
10,926 PointsYes. Is there a way to share my code that I don't know about?
Liam Maclachlan
22,805 Pointsi haven't done it yet, but I think you can copy and paste the link to share it
Liam Maclachlan
22,805 PointsLol. Nope. On the workspaces there is a 'help' section. Moe info on sharing it should be there :)
Liam Maclachlan
22,805 PointsFound it. With the workspace open, click 'snapshot' at the top right :) Then share the link
Jacob Smith
10,926 PointsI think this link should work!
2 Answers
Jason Anders
Treehouse Moderator 145,860 PointsHey Jacob,
It's just a simple typo you have in your background-size
declaration. You have a space between 20 and px.
.contact-info a {
display: block;
min-height: 20px;
background-repeat: no-repeat;
background-size: 20px 20px; /* removed space on second 20px. */
padding: 0 0 0 30px;
margin: 0 0 10px;
Keep Coding! :)
Jacob Smith
10,926 PointsHaha Oh my goodness. Such an easy thing to overlook. Thank you Jason!!
Jason Anders
Treehouse Moderator 145,860 PointsNo worries. Happens to all of us. :)
Liam Maclachlan
22,805 PointsLiam Maclachlan
22,805 PointsBefore seeing the code, I would say set the width of the images to 100%. Can you share your code? :)