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 trialJay Valentine
Courses Plus Student 4,389 PointsTwitter 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');
}
6 Answers
Philip G
14,600 PointsAs 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
Matthew Greenberg
8,173 PointsLinux 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');
Jay Valentine
Courses Plus Student 4,389 PointsThat didnt work?
Wayne Priestley
19,579 PointsHi James,
What happens if you try .contact-info .mail a
?
Melanie Guymon
5,049 PointsDid 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
19,579 PointsHi James,
You need to add a width and height to your background images of 20px.
Becky Pearson
434 PointsHello,
I'm having the same problem. Did you work it out?
Becky
Wayne Priestley
19,579 PointsHi 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.
Philip G
14,600 PointsPhilip G
14,600 PointsCan you give me an URL? Thanks.