开发者

Sharepoint 2007 - link to individual sites' images in CSS

I am trying to link to a image stored in the Images library of an individual site collection.

I am able to link to images in the root site collection folder using url(../../Images/imagename.ext), however I want to link to the individual sites Images library, without directly inserting the site name.

I know this can be done easily enough in a page layout, using a dynamic token #SPUrl开发者_运维问答:~site

Is there an equivalent I can use in CSS?


Do your images need to change from site collection to site collection? If not, I put them into the 12\TEMPLATE\IMAGES\MyProject directory. I can then refer to the image in CSS as:

background-image: url(/_layouts/images/myproject/imagename.ext);

The virtual _layouts path insures that it will work for any depth on the server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜