An Alien Posted December 25, 2009 Share Posted December 25, 2009 HTML: <div id="content" > </div> CSS: #content { background-image:url(bg.jpg); width: 851px; height: 100%; margin-left: auto; margin-right: auto; padding-top: 10px; } That's not the whole code but I just want to make sure it's right. I had the bg.jpg in images folder, but since it was not working, I tried putting it in the root and in still doesn't work. I even tried using the html tag for background image but that didn't even work, I made sure the background image name and the extension was correct too.I also tried adding an actual height and a test paragraph and image inside the content div. Link to comment Share on other sites More sharing options...
Err Posted December 25, 2009 Share Posted December 25, 2009 background-image:url(bg.jpg);If that's how you're calling your background image, make sure the image is the same folder as your CSS. If you were calling it from the root directory, then add a leading slash there. url(/bg.jpg); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.