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-images not showing in footer

I have more or less copied the existing project files from the Introduction to HTML and CSS course (https://teamtreehouse.com/library/introduction-to-html-and-css) to use for practice and modify for my own portfolio. In worskspace for this project, the social media icons in the footer (using the backgroun-image css property, work just fine. When I modify this to include the actual links to my social media, the icons do not show up. My website is at erinknapp.io so you can see the code. My project structure is as follows: css folder (with css files), images folder (with image files) and html pages. I'm not sure what I am missing or what I have done wrong. Thanks in advance!

Nevermind I figured out the answer. The css should read: a.github { background-image: url(../images/github.svg); } for example. I thought I had done that already but I messed it up somehow.

1 Answer

Steven Parker
Steven Parker
230,248 Points

It looks like the file organization has changed, and the background URL's need to be adjusted accordingly.

For example:

a.twitter {
    background-image: url(../images/twitter.svg);
}