Fukushousha Posted April 5, 2008 Share Posted April 5, 2008 Hello and sorry for asking another question so soon ,I got a problem. I am designing a site using <div> for first time. So in a div I put a background image like that :#mydiv { position:absolute; background-image: url(mypic.jpg); background-repeat: no-repeat; background-position:center; left: 0%; top: 0px; width: 200px; height: 112px; top: 1px;} When inside the html code I use this div, it is not putting the pic at the background. I have the picture in the same file I have the html code ... what could the problem be? :/ Link to comment Share on other sites More sharing options...
Ingolme Posted April 5, 2008 Share Posted April 5, 2008 Is this CSS in a stylesheet in a separate folder? Link to comment Share on other sites More sharing options...
Fukushousha Posted April 5, 2008 Author Share Posted April 5, 2008 Ha! You are right! The images should go in the same file as the stylesheet! Now it worked. Thanks mate ... I was trying the opposite getting the images in the same file as the html file >_< Link to comment Share on other sites More sharing options...
jlhaslip Posted April 5, 2008 Share Posted April 5, 2008 Ha! You are right! The images should go in the same file as the stylesheet! Now it worked. Thanks mate ... I was trying the opposite getting the images in the same file as the html file >_<That can be done as well, but you would need to simply adjust the references to account for their location using relative addresses.ie: '../../folder/sub-folder/image.gif' ... or whatever you need ... this would be up two folders and into the folder/sub-folder to find the image Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.