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 trialTanja Heese
4,812 Pointsbackground-image and background-size get ignored by browser
Hi there,
the code background-image and background-size are ignored by my browser somehow. For background-image I solved it with only writing background instead of background-image. Why is that?
For the size of the icons I have no solution though. How can I make them small enough to fit?
my code: .contact_info { list-style-type:none; padding:0; margin:0; font-size:0.9em; }
.contact_info a { display:block; min-height:20px; background-size:20px 20px; padding: 0 0 0 30px; margin: 0 0 10px; }
.contact_info li.phone a { background: url("../img/phone.png") no-repeat; }
.contact_info li.mail a { background: url("../img/mail.png") no-repeat; }
.contact_info li.twitter a { background: url("../img/twitter.png") no-repeat; }
2 Answers
Marc Busby
35,550 PointsHi Tanja,
What browser are you using? It's possibly a compatibility issue but most browsers support the background-image and background-size markup.
See this site for compatibility for details.
Regards,
Tanja Heese
4,812 PointsThank you for your reply! I was using the newest Chrome. But it works now. Whatever it was...