On Today at 9:38am, AL=>Andy Law <andy....@roslin.ed.ac.uk> wrote:

AL> [..snip..]
AL> 
AL> th.myclass {
AL>     background-image: url('images/image.gif');
AL> }
AL> 

Andy,

If your file structure is somewhat like:

styles/base.css
images/image.gif

then you can simply change your background-image directive to say:
background-image: url('../images/image.gif');

or in other words, your image path will be relative to the path from where 
the .css file is located. So, no need to worry about context paths and/or 
nesting levels of action URLs.

Now, if your css is specified inline as part of the HTML, then you will 
need to make sure that your image path is relative to the path of the URL 
where the HTML was generated. That's a different scenario.

Hope this helps.

Later,
--
Haroon Rafique
<haroon.rafi...@utoronto.ca>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to