You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Josh Savage <Jo...@leftclick.co.nz> on 2004/09/24 02:23:48 UTC

CSS and images

Hi,

 

I am trying to change the bullet image on a bunch of list items using
css but I am having problems finding the image's location. I have placed
the images in the resources/shared/images directory. 

 

Here is my css code:

 

div#sidemenu li {

list-style-type: disc; 

            list-style-image: url(../images/star_bullet.gif); 

            font-size:13px; 

            font-weight:bold;

}

 

Thanks in advance,

Josh


Re: CSS and images

Posted by Andreas Hartmann <an...@apache.org>.
Josh Savage wrote:
> Hi,
> 
>  
> 
> I am trying to change the bullet image on a bunch of list items using 
> css but I am having problems finding the image’s location. I have placed 
> the images in the resources/shared/images directory.
> 
>  
> 
> Here is my css code:
> 
>  
> 
> div#sidemenu li {
> 
> list-style-type: disc;
> 
>             list-style-image: url(../images/star_bullet.gif);

This should read (note the ' signs):

              list-style-image: url('../images/star_bullet.gif');

> 
>             font-size:13px;
> 
>             font-weight:bold;
> 
> }

Maybe the relative path is wrong?

The solution is dynamic CSS, which is supported
by Lenya out-of-the-box.

Assuming that your CSS file is called "page":

- create a file resources/shared/css/page.css
   (this is necessary but can contain some dummy text)

- create a file resources/shared/css/page.xml

<css>

   div#sidemenu li {
     list-style-type: disc;
     list-style-image: 
url('<context-prefix/>/mypub/live/images/star_bullet.gif');
     font-size:13px;
     font-weight:bold;
   }

</css>

The <context-prefix/> element will be replaced by the
actual context prefix.

It would be nice to have the publication ID and area
dynamic too, maybe you'd like to file an enhancement bug.

-- Andreas




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


Re: AW: CSS and images

Posted by Andreas Hartmann <an...@apache.org>.
Christian Kreutz wrote:
>  
> 
>  
> 
> ------------------------------------------------------------------------
> 
> *Von:* Josh Savage [mailto:Josh.Savage@leftclick.co.nz]
> *Gesendet:* Freitag, 24. September 2004 03:24
> *An:* lenya-user@cocoon.apache.org
> *Betreff:* CSS and images
> 
>  
> 
> Hi,
> 
>  
> 
> I am trying to change the bullet image on a bunch of list items using 
> css but I am having problems finding the image’s location. I have placed 
> the images in the resources/shared/images directory.
> 
>  
> 
> Here is my css code:
> 
>  
> 
> div#sidemenu li {
> 
> list-style-type: disc;
> 
>             list-style-image: url(../images/star_bullet.gif);
> 
>             font-size:13px;
> 
>             font-weight:bold;
> 
> }
> 
>  
> 
> Shouldn’t it be this way:
> 
>  
> 
> #sidemenu li { ..
> 
>  
> 
> } 

It's more general (works for all elements).
The above one is for <div>s only.

-- Andreas


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


AW: CSS and images

Posted by Christian Kreutz <sc...@gmx.de>.
 

 

  _____  

Von: Josh Savage [mailto:Josh.Savage@leftclick.co.nz] 
Gesendet: Freitag, 24. September 2004 03:24
An: lenya-user@cocoon.apache.org
Betreff: CSS and images

 

Hi,

 

I am trying to change the bullet image on a bunch of list items using css
but I am having problems finding the image's location. I have placed the
images in the resources/shared/images directory. 

 

Here is my css code:

 

div#sidemenu li {

list-style-type: disc; 

            list-style-image: url(../images/star_bullet.gif); 

            font-size:13px; 

            font-weight:bold;

}

 

Shouldn't it be this way:

 

#sidemenu li { ..

 

}  

 

 

Thanks in advance,

Josh