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 Iconography

Double twitter icon, items on the far left

Hi everyone,

I came across an interesting problem: when I add the icons they are thrown all the way to the left and the twitter icon is doubled for no apparent reason. Code included.

<section>
        <h2>Contact details</h2>
        <ul id="contact-list">
            <li class="phone"><a href="tel:00436649279080">+43 664 927 9080</a></li>
            <li class="mail"><a href="mailto:nejc.vukovic@gmail.com">nejc.vukovic@gmail.com</a></li>
            <li class="skype"><a href="skype:nejc.vukovic?add">nejc.vukovic</li>
            <li class="twitter"><a href="http://twitter.com/intent/tweet?screen_name=nejc_vukovic" target="_blank">@nejc_vukovic</a></li>
        </ul>
</section>
#contact-list
{
    padding: 0;
    margin: 0;
    list-style: none;

}

#contact-list a {
    display: block;
    min-height: 20px;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    margin-bottom: 10px;
}

#contact-list img {
    display: inline;
}
#contact-list a:link, #contact-list a:visited  {
    text-decoration: none;
    color: #197CDB;
    font-weight: bold;
}

#contact-list a:hover{
    color: gray;
}

#contact-list li.phone a {
    background-image: url('../_img/phone-c.png');
}

#contact-list li.mail a {
    background-image: url('../_img/mail-c.png');
}

#contact-list li.skype a {
    background-image: url('../_img/skype-c.png');
}

#contact-list li.twitter a {
    background-image: url('../_img/twitter-c.png');
}

1 Answer

Well as soon as I've posted this I found the problem :) I was missing a </a> in my HTML markup for the skype contact...

Ooops:D

And "display: inline; " helped me setting the icons on the left side of the <a> elements :D

Sorry for the false alarm:D