For client customization, I was looking for a solution in CSS to define
or override the IMG "src" attribute. I asked around on a CSS newsgroup
and looked at the CSS spec and unfortunately CSS doesn't allow to
define/redefine/override the "src" attribute. So far, I know of a
couple of solutions:
- the server generates a different "src" attribute depending on your
criteria (you probably already know that)
- the "src" attribute is changed dynamically with Javascript on the
client browser. Not really CSS, but quite a good solution.
- a blank/transparent image is used as a "src" image and the real
images  are used as background images for the IMG element in your
different CSS files. The problem here is that you have to deal with the
sizes of the images, which might be an issue for you if you have all
images of the same size or if you specify the sizes in the CSS file for
the background images, otherwise they can get cropped or off-center,
etc...

Hope this helps.

Fred

--- Denis McCarthy <[EMAIL PROTECTED]> wrote:

> Hi,
> I need to support both localized images and images with several css 
> styles. For example, say I've 2 css files, CSS1 and CSS2, and need to
> 
> support 2 languages, EN and ES. What I'd like to support is 4 images 
> like this:
> 
> img_CSS1_EN
> img_CSS1_ES
> img_CSS2_EN
> img_CSS2_ES
> 
> , each one appearing according to the style and locale selection
> 
> It's possible to localize the images using the @Image component, but
> I'm 
> not sure whether its possible to get this to play well with multiple 
> stylesheets (css doesn't seem to allow the definition of the src 
> attribute for img classes).
> 
> My only solution I have at the moment is the rather awkward one of 
> having a css file per locale per style - I'd prefer to only have a
> css 
> file per style and let tapestry look after the localization -
> including 
> the images.
> 
> Has anyone had this requirement before, and how did they solve it?
> Thanks
> Denis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to