Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Images path in CSS
atosoriginal
Hi
I am new to IOW Live site . I have few doubt regaring css and images path.
My directory stracture are as below
css file is in $URL_PREFIX/assets/common/css
Images are in $URL_PREFIX/assets/images
I want to include back ground image path in css. Is it possible to provide relative image URL path ? Any help will be apriciated.
Thanks in adavnce..
Find more posts tagged with
Comments
Sharkie
In your css files start your path with slash, this way the images will be located based on context root:
background-image: url(/assets/images/yourImageHere.gif);
This works fine on the server but not locally (if you save your pages locally for testing/debugging purposes). To make it work locally you would have to change the above to:
background-image: url(../../assets/images/yourImageHere.gif);
or something similar depending how you saved it.