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

Daniel Brown
Daniel Brown
4,616 Points

Mail and Twitter icons are doubling

When I put my mail and twitter Icon pictures on the contact page they doubled on me,but the phone icon is correct and it did not double the picture.

here is the html: <ul class="contact-info"> <li class="phone"><a href="tel:000-888-8888">000-888-8888</li> <li class="mail"><a href="mailto:danielsample@gmail.com">danielsample@gmail.com</li> <li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=daniel13rown">@daniel13rown</li> </ul> CSS:

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

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

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

4 Answers

geoffrey
geoffrey
28,736 Points

If you typed the html the same way you did here, It's normal It's not working correctly, there are unclosed tags and others mistakes. Here is the way that should be written.

   <ul class="contact-info">
       <li class="phone"><a href="tel:000-888-888">000-888-888</a></li>
       <li class="email"><a href="mailto:danielsample@gmail.com">danielsample@gmail.com</a></li>
   </ul> 

<!--- and etc -->
Kuhrt Cowan
Kuhrt Cowan
23,796 Points

Looks like you're missing your closing anchor tags on all three list items. Just need

</a>

before each of your

</li>
Daniel Brown
Daniel Brown
4,616 Points

I know that, I took out the unclosed tags because it did not show up in the forum correctly the first time. In my code there are closed tags on every thing

html <ul class="contact-info"> <li class="phone"><a href="tel:000-888-8888">000-888-8888</li> <li class="mail"><a href="mailto:danielsample@gmail.com">danielsample@gmail.com</li> <li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=daniel13rown">@daniel13rown</li> </ul>

Kuhrt Cowan
Kuhrt Cowan
23,796 Points

The code looks good, but it is still missing the closing </a>s. The code below I just copy and pasted from your post but added the </a> before all the closing </li>. It should work with those 3 added.

<ul class="contact-info"> <li class="phone"><a href="tel:000-888-8888">000-888-8888</a></li> <li class="mail"><a href="mailto:danielsample@gmail.com">danielsample@gmail.com</a></li> <li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=daniel13rown">@daniel13rown</a></li> </ul>
Daniel Brown
Daniel Brown
4,616 Points

Thanks kurt, I am laughing at myself for not realizing this earlier :)