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 CSS Foundations Selectors Class and ID Selectors

Thomas Cobb
Thomas Cobb
3,222 Points

Trouble incorporating the #top id element. Used an <img> instead of <p> for link to top. img does not show. help please

</section> </div>

    <a href="#top"><img src="img/circle-arrow_up-upload-outline-stroke.svg" alt="Top"></a>

    <footer>

Above the footer and below the main div for my index file. The image does not display. I've seen this easy button on other pages where it can easily bring you back to the top of the page and I want to make something more simplistic rather than a <p> tag containing a "back to top" link.

Is your image name/path absolutely correct? If there's even a small mistake, then your won't see your image.

1 Answer

Robert Tyree
Robert Tyree
13,335 Points

Your syntax seems good. I wonder if it's the placement within the HTML document. Have you tried including this in your footer div and seeing if it shows up?

Thomas Cobb
Thomas Cobb
3,222 Points

It works fine without being within the footer. My background was black and I thought that the inside of my image was white. However now I'm having trouble aligning it in the center of my website.