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

background repeat problem

Hi, I just completed stage 7 in the website design segment and just cannot figure out what is wrong with the styling of the background images on my About page, which can be seen here:

http://web.zi5okytwpl.treehouse-app.com/contact.html

Here's the code I just worked on:

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

Thanks in advance for any help.

3 Answers

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

I think your problem is not with this code. This is what I have on my contact page, and it works fine. When I look at your source code on your main.css, just below that I think you are missing the 'a' for setting the background image. This is what I have on mine.

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

So, each line should be .contact-info li.phone a { ---- you don't have the a.

Privado Coronel
Privado Coronel
13,504 Points

try this maam

body { background: url('you image path here') no-repeat; }

Privado is right. It does not appear there is an image path.

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

She didn't include all her code in her post. The image path is actually included a little further down in her code.

Emma, thank you very much that is indeed the problem. I thought it must be something apart for that, but this is really new for me and I was not even sure what to look for.

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

Glad to help. With practice, it'll be come easier, but finding an issue with your code can always be difficult. :-)