0

Hi,

In my css file, I want to provide url to some resources which belong to some other project. The context of that project can be changing.
Is there a way in css, by hwich I can provide a url with a variable or with property pointing to the dynamic context.
Maybe something like:

.menu-scroll-bottom{
    background-image:url("${request.getContextPath()}-static/resources/images/mini-b.gif");
    }

or something like:

.menu-scroll-bottom{
    background-image:url(<%=request.getContextPath()%>-static/resources/images/mini-b.gif);
    }

I have both of the above, but none works.
Is there any way to solve this?

Thanks in advance

3
Contributors
3
Replies
20
Views
4 Years
Discussion Span
Last Post by Eng. Hadi
0

No, but you could use a server side link. But unless you own the server thats not going to help you much.

0

@ggamble
Do you mean by "server side link" a link generated by a server-side language like PHP. If so the image name should be a variable. But the problem is that the file is a (.css) file and couldn't be parsed by the php engine. So please clarify your idea to understand it :) .

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.