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

Twitter and Mail background images arent loading? quick help

The Twitter and Mail images/icons arent loading, here is my code HTML

<section>
        <img src="img/me9.jpg"  class="profile-photo">
        <h3>General Contact Information</h3>
          <p> I am not currently looking for Web Design and designing work as i am in the process of learning Web Design, although check back often as this will change soon</p>
          <p2>If you would like to contact me for any reason, dont hesistate to tweet me at <a href="http://twitter.com/intent/tweet?screen_name=@Jamesvalentine_"> @JamesValentine_ </a> or email me at <a href="mailto:Jamesvalentinee@gmail.com">JamesValentinee@gmail.com</a> </p2>
      </section>
      <section>
        <h3>Contact Details</h3>
        <ul class="contact-info">
        <li class="mail"><a href="mailto:Jamesvalentinee@gmail.com">JamesValentinee@gmail.com</a></li>
        <li class="Twitter"><a href="http://twitter.com/intent/tweet?screen_name=@Jamesvalentine_"> @JamesValentine_</a> </li></ul>
      </section>

and my CSS is

/*****************************************
PAGE: CONTACT
******************************************/

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9em;
}
.contact-info li.mail a {
background-image: url('../img/mail.png');
}

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

Can you give me an URL? Thanks.

6 Answers

As I saw the selector matches fine and binding in an external image works, too.

Where is your CSS file located to?

You should maybe try this:

/*****************************************
PAGE: CONTACT
******************************************/

.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9em;
}
.contact-info li.mail a {
background-image: url('/img/mail.png');
}

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

Best regards,

Philip

Linux systems use specific syntax to navigate though the file system tree.

The '../' in your image path means go the parent directory of where the current file is located and look for a img folder. Just drop the ../ and you should be fine.

background-image: url('img/mail.png');

That didnt work?

Wayne Priestley
Wayne Priestley
19,579 Points

Hi James,

What happens if you try .contact-info .mail a ?

Did you happen to make sure you have the files in the same folder you are telling the HTML to pull from? Simply following the instructions in the video won't work if you don't have the images in the img folder. :)

Wayne Priestley
Wayne Priestley
19,579 Points

Hi James,

You need to add a width and height to your background images of 20px.

Hello,

I'm having the same problem. Did you work it out?

Becky

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Becky,

If you post your code we can take a look for you :)

Better to post it in a new forum post as more people will see it.