spadez
02-09-2008, 02:19 PM
Hey guys.
My structure goes like this:
website.com/css/style.css
website.com/images/
website.com/index.html
I have the written the locations of some images in my CSS file. I dont want to hardcode my images because im changing my url soon, so is there a way to specify the root of the website in the url.
For example, at the moment in my css i have this as the location of the image:
"/images/image1.jpg"
But, that points to www.website.com/css/images/image.jpg
I need it to point to www.website.com/images/images.jpg
So i what i need is something like this:
"<root of site>/images/image1.jpg" but make it flexible, so if i upload the file to any url it will work, i.e not put website.com in the image address.
Please help!
My structure goes like this:
website.com/css/style.css
website.com/images/
website.com/index.html
I have the written the locations of some images in my CSS file. I dont want to hardcode my images because im changing my url soon, so is there a way to specify the root of the website in the url.
For example, at the moment in my css i have this as the location of the image:
"/images/image1.jpg"
But, that points to www.website.com/css/images/image.jpg
I need it to point to www.website.com/images/images.jpg
So i what i need is something like this:
"<root of site>/images/image1.jpg" but make it flexible, so if i upload the file to any url it will work, i.e not put website.com in the image address.
Please help!