Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change 
notification.

The following page has been changed by josias:
http://wiki.apache.org/lenya/HowToCSS

New page:
== Tips about using CSS in a Lenya Publication ==

=== Use images ===
If you want to use images in your css (e.g. for the page background), the 
question is which is the correct path to use in url().
Say we have the following resources:
{{{
/mypub/resources/css/page.css
/mypub/resources/images/background.png
}}}

The easiest way to refer to background.png in page.css is the following:

{{{
#foo {
    background-image: url("../images/background.png");
}
}}}

If a relative path does not work for you, you may create the file 
{{{
/mypub/resources/css/page.xml
}}}
which contains all the css code of page.css, but inside an xml element:

{{{
<?xml version="1.0" encoding="UTF-8"?>
<css>
#foo {
    background-image: 
url("<context-prefix/>/mypub/authoring/images/background.png");
}
</css>
}}}

Lenya will the replace the element <context-prefix/> by the actual 
context-prefix.

Note that the file page.css is still needed, but it's content is completely 
ignored. Only the content of page.xml matters now.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to