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 trialModure Rares
Courses Plus Student 9,041 PointsWhy I cant add images in my HTML???
Whenever I want to use a image ( for a background for example ) I cant . Please help me.
Here is the code
<!DOCTYPE html> <html> <head> <title>Cluj Napoca | Oras Medieval</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="main.css"> <link href="https://fonts.googleapis.com/css?family=Dancing+Script" rel="stylesheet"> </head> <body> <header> <div id="nav-wrapper"> <div class="navigation"> <div id="logo">Cluj | Napoca</div> <ul id="nav-menu"> <li><a href="#">POPULATIE</a></li> <li><a href="#">DESPRE CLUJ</a></li> <li><a href="#">ATRACTII</a></li> <li><a href="#">HOME</a></li> </ul> </div> </div> <img src="ClujWEBSITE/imgcluj.jpg">
3 Answers
Dean Jenkins
556 PointsA background image has to be done in CSS
Dean Jenkins
556 PointsFor Example
<div class="header"> </div>
.header { background-image: url('../img/background.png'); }
Nityananda Das
893 PointsIn CSS body { background:url("../img/background.png") no-repeat; }