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

CSS How to Make a Website Adding Pages to a Website Add and Style Icons

set the background size to 20 pixels square

"With the anchor elements inside the contact-info list still selected, set the background size to 20 pixels square."

ul.contact-info a {
  background-size:20px;
}

What I doing wrong?

6 Answers

Please try this, a is an inline element and that it shows up only if there is text or other images that are of type block within it. I am taking the assumption that you have the markup of HTML in this way. <ul class="contact-info"> <li><a href="#"></a></li> </ul>

so the css for the background image to show up would be

ul.contact-info li a { display:block; width:npx; height: npx; background-image:url("path to your background image"); background-size:20px; }

solucion: background-size: 20px 20px;

Antonio Merchant-Bunkley
Antonio Merchant-Bunkley
1,242 Points

THIS is the correct solution to the problem.

thanks

what is the css that you put before ul.contact-info for?

do use "ul.contact-info a { background-size:20px; }"

the code should work

Do not work.

please put a number of your choice at the place of n at the width and height, and put the path in between the double-quotes within the url braces.