Forums / Setup & design / image links within a linked CSS file..

image links within a linked CSS file..

Author Message

Jason Brock

Wednesday 28 May 2003 9:47:34 pm

Does the substitution parser work with external CSS files?
How do I reference images?

.bannerBgVWD1 {
background-image: url(http://localhost/design/demo/images/bg_ivr.gif);
}

Ta,
Jb.
--

Bård Farstad

Thursday 29 May 2003 5:48:45 am

No, eZ publish does not parse css files. So you will not be able to use the ezurl operator and friends in .css files.

--bård

Documentation: http://ez.no/doc

Fred Nerks

Thursday 17 March 2005 9:05:08 am

Does that mean that all URLs within linked files need to be relatively referenced?

Łukasz Serwatka

Thursday 17 March 2005 11:36:28 pm

@Fred

You can use both relative or absolute but relative is more flexible (if you move your site for example)

.bannerBgVWD1 {
    background-image: url(../images/bg_ivr.gif);
}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Xavier Dutoit

Thursday 17 March 2005 11:40:31 pm

Two problems I've had when I started using css:

- don't put space between 'url' and '('
- the image's url has to be defined relatively to the css file, not from the root of the web site nor the page containing the css.

Have fun,

X+

http://www.sydesy.com