You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Bruce <br...@tfnet.ca> on 2005/07/15 22:58:03 UTC

Background image in Lenya

I'm trying to figure out how to put a background image (i.e., a 
'watermark', if you like) on a Lenya site.

My setup -  the publication in question is in:

 /usr/share/tomcat5/webapps/lenya/lenya/pubs/mypub/

which I'll call $MYPUB.

I put my images in $MYPUB/resources/shared/images/. I can now use those 
images in $MYPUB/xslt/page2xhtml.xsl, as follows:

  <img src="{$root}/images/myimage.jpg" alt="My Image"/>

to replace the default Apache Lenya logo with my own image.

What I'd like to do is use an image as a tiled background to the entire 
page, sort of like a watermark. I'm not entirely sure how to go about this.

I gather this can be done with a background-image directive in the 
page.css file; however, I'm not entirely sure how. I tried the following 
(with various variations of the path to the image, i.e., putting in 
more, and less, of the full path) in page.css, but it didn't work:

/* page */
 #page {
   background-image: url(/resources/shared/images/myimage.jpg);
 }

Any suggestions on how to use an image as a background in Lenya?

Thanks,

B.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Background image in Lenya

Posted by Bruce <br...@tfnet.ca>.
On Friday 15 July 2005 18:43, Rolando Isidoro wrote:
> > Any suggestions on how to use an image as a background in Lenya?
>
> Hi Bruce, I've managed to do what you want by adding this line in the
> page.css:
>
> background-image: url(../images/bg.png);
>
> Hope it works for you too,
> Rolando

That's it, thanks! To refer to an image from page.css, give the url relative 
to page.css itself - so obvious, never occurred to me to try. One gets used 
to more complex paths set in some other cofiguration file, such as with 
Apache & Tomcat and so on.

Thanks,

Bruce

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Background image in Lenya

Posted by Rolando Isidoro <rl...@uninova.pt>.
> #page {
>   background-image: url(/resources/shared/images/myimage.jpg);
> }
>
> Any suggestions on how to use an image as a background in Lenya?

Hi Bruce, I've managed to do what you want by adding this line in the 
page.css:

background-image: url(../images/bg.png);

Hope it works for you too,
Rolando

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org