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 Adding Pages to a Website Add and Style Icons

Ryan Decker
Ryan Decker
3,451 Points

Background Size???

This challenge is telling me to set the background size to 20px. Is my code wrong? It won't let me pass.

''' .contact-info a { display: block; min-height: 20px; background: no-repeat; background-size: 20px; padding: 0 0 30px; ,,,

6 Answers

Stone Preston
Stone Preston
42,016 Points

you need to set a width and height for background size to make it 20px square:

 background-size: 20px 20px;

also be sure you set your padding correctly as well:

 padding: 0 0 0 30px;
Ryan Decker
Ryan Decker
3,451 Points

Gracias! That slipped by me! :)

Carlos Cano
Carlos Cano
2,877 Points

Nicholas, for "background-size", change your semicolon to a colon ':'

Nicholas Nelson
Nicholas Nelson
3,269 Points

here is my code, it still won't let me pass saying "did you set the background size for contact info links to 20px?" Please help. Also, there's no way to "skip a question" and just move on in case you can't find the answer?

.contact-info a{
    display: block;
  min-height: 20px;
  background: no-repeat;
  background-size; 20px 20px;
  padding: 0 0 0 30px;
}
Heather Walker
Heather Walker
1,648 Points

.contact-info a { display: block; min-height: 20px; background-repeat: no-repeat; background-size: 20px 20px; padding: 0px 0px 0px 30px; }

I am not sure why but I had to copy the "padding: 0px 0px 0px 30px;" and change the values from an example I found here http://www.w3schools.com/css/css_padding.asp to get mine to work. I went back several times trying to recreate the answer but the only way it would work is by copying and pasting. I assume it was an unseen spacing oversight on my part but I can't be sure. My above code does complete this question correctly though.

Thanks you