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 trialJohn Lukacs
26,806 PointsBackground img wont show up using div
.side-a {
background-image:url('io.jpg');
}
.side-a {
background-image:url('io.jpg');
}
8 Answers
Grace Kelly
33,990 PointsHi John, your code looks all good from what I can see which leads me to ask the following:
Have you linked your css file inside your html file properly e.g is there any spelling mistakes in the name of the file/path directory etc?
Have you linked the image file correctly (e.g spelling, file extension and path directory (if it's in an image folder make sure to include its path e.g img/io.jpg))?
John Lukacs
26,806 Points<div class="wrap">
<div class="side-a"></div>
<div class="side-b"></div>
</div>
John Lukacs
26,806 PointsThey pictures are in the same file in dreamweaver. Anyways I tried img/io.jpg and ../io.jpg and ../img/io.jpg none of them work. The css file is working
Grace Kelly
33,990 Pointshmm try giving the div a width and height, it could be because the image has nothing to fill that you aren't seeing anything on the screen....
John Lukacs
26,806 PointsI was thinking about this to. I added 1400px of space. it opened up more room but no picture
John Lukacs
26,806 PointsI added a background color and that seems to work but no picture
John Lukacs
26,806 PointsOk the height thing worked
Grace Kelly
33,990 Pointsawesome :D
John Lukacs
26,806 PointsNow its not working it shows up in live view on dreamveaver then I click on the screen and it goes away
John Lukacs
26,806 PointsWidth:100% height:100% to the div worked