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

Matt Coston
Matt Coston
18,425 Points

Challenge task 4 of 5 in Adding Pages to a Website.

I am having trouble with this challenge. The question is With the anchor elements inside the contact-info list still selected, set the background size to 20 pixels square. Then set the left padding to 30 pixels, with all other padding at 0.

Here is my current CSS:

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

}

I am not sure what I am lacking. Any ideas? I appreciate any feedback.

3 Answers

you're close...

background-size: 20px 20px :)

just to elaborate, background-size takes a width and height, and the challenge is asking for 20px "squared," which would be 20px 20px

Hey Matt, see if this will work for you.

.contact-info a { 
    display: block; 
    min-height: 20px; 
    background: no-repeat; 
    background-size: 20px 20px;
    padding: 0 0 0 30px; 
}
Matt Coston
Matt Coston
18,425 Points

Thank you both very much. It works like a charm.