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
Darren Franks
1,006 PointsImage 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
Michalis Efstathiou
Courses Plus Student 4,638 Pointsyou 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); }
Darren Franks
1,006 PointsOk i think i understand thank you for your time, i will give it a go fingers crossed!
Michalis Efstathiou
Courses Plus Student 4,638 PointsI apologize, I think the post didnt display my code
so the code for adding an image is
<img src="folder/some_image.png">
Darren Franks
1,006 PointsBless 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!