background images???

liunx

Guest
body {background:#333333;
margin:0;
scrollbar-3dlight-color:#C0C0C0;
scrollbar-arrow-color:#C0C0C0;
scrollbar-base-color:#333333;
scrollbar-darkshadow-color:#333333;
scrollbar-face-color:#333333;
scrollbar-highlight-color:#C0C0C0;
scrollbar-shadow-color:#333333}


so come on then how the heck do i do it im using the above code to sort everything like that out so how do i get a background on it aswell as the colour (you know incase they are not showing images in there browser)
cyaz
ajbody {background:#333333 url('background_image.gif') repeat;
margin:0;
scrollbar-3dlight-color:#C0C0C0;
scrollbar-arrow-color:#C0C0C0;
scrollbar-base-color:#333333;
scrollbar-darkshadow-color:#333333;
scrollbar-face-color:#333333;
scrollbar-highlight-color:#C0C0C0;
scrollbar-shadow-color:#333333}i carnt get it to work does the image need to be online for it to work, i dont mean the sites online before anybody says, im doing the website and the images location is Images/background.gif but i carnt get it to work no matter what what might i need to do?

cyaz
ajforgot to mention its not embeded its linked if this makes any difference


cyaz
ajYou can use a relative directory. For instance, if the graphic is in an "img" directory one level down from your html, file:

url('img/background_image.gif')

Or you can always use the full URL:

url('http://www.mysite.com/img/background_image.gif')i was having one of my "hey im a goldfish look at me" moments as guess what i had rearlised? i had the script file in a folder called script files and the image in the images files so the script was like wow i aint got a folder called dat anywhere in here lol cut it out and pasted it into the main folder and it works

thanks so much for your help

cyaz
ajOriginally posted by NogDog
You can use a relative directory. For instance, if the graphic is in an "img" directory one level down from your html, file:

url('img/background_image.gif')
More specifically, the url is relative to the directory containing the document with the style definition. If this is an imbedded style sheet then that is the html page bur if it's an external style sheet then it's the style sheet.
 
Back
Top