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 Iconography

Carleen Hall
seal-mask
.a{fill-rule:evenodd;}techdegree
Carleen Hall
Front End Web Development Techdegree Student 3,158 Points

Add Iconography

Hi, Initially when I trying adding the iconography the background images were not showing up. After I had done a browser, reset I got multiple images of the same icons spread across the page. I closed and re-wrote the CSS code (.contact li a ) now I am back to square one. The images are not showing up. Any suggestions?

        .contact-info {
    margin: 0;
    padding: 0;
    list-style: none; 
    font-size: 0.9em;
}

.contact-info li a {
    background-image: url('..img/phone.png');

}

.contact-info li a {
    background-image: url('..img/mail.png');

}



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

          ```

4 Answers

Did you change this?

 background-image: no repeat; <--change to background-repeat: no-repeat; -->

Hi, found a couple things to fix in your code:

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

.contact-info li.phone a {  <--added the .phone class -->
    background-image: url('..img/phone.png') <-- change to url('../img/mail.png')-->
}

.contact-info li.mail a { <--added the .mail class -->
    background-image: url('..img/mail.png') <-- change to url('../img/mail.png')-->
}
Carleen Hall
seal-mask
.a{fill-rule:evenodd;}techdegree
Carleen Hall
Front End Web Development Techdegree Student 3,158 Points

Thanks, I made the changes. However, there are still multiple images of the icon showing up all across the page. Do you have any other suggestions? ``CSS .contact-info { margin: 0; padding: 0; list-style: none; font-size: 0.9em; }

.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');

}

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

      ```
Carleen Hall
seal-mask
.a{fill-rule:evenodd;}techdegree
Carleen Hall
Front End Web Development Techdegree Student 3,158 Points

Oh! Kate, Thanks a mil. I completely overlooked the "background-repeat" I thought we have to indicate "background-image" in order for the image to show up. Thanks again.