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

General Discussion

Image in header!

Hi i want to add a image in my header, do i just add the path in my css under the header tag or do i also put this in my html doc? I would be very grateful for a full explanation of how to for Dummies!!! Thank you, my web page is darrenfranks.org

4 Answers

you can do both, in a way

to add an image to the html you can do <img src="images/picture.png">

or if you want you can add it through css as a background to a div

e.g

if you have a div in your html <div class="someDiv">Content</div>

and in your css you would do something like

.someDiv { background-image: url(http://www.example.com/bck.png); }

Ok i think i understand thank you for your time, i will give it a go fingers crossed!

I apologize, I think the post didnt display my code

so the code for adding an image is

<img src="folder/some_image.png">

Bless thank you so much I've been away from my computer for most of the day! Thank you for you help on this I will try it Saturday!