If you are using the height/width to pre-allocate space on the page for the image (not to "resize" the image on the fly) you can use a style sheet to specify a width and height.

If the width/heigh you specify do not match the width/height of the actual image though, it won't be pretty.

In case you don't know anything about CSS, the code you want would be:
style="width:100px; height:200px"

Matt Bathje

Janne Mattila wrote:
No, I am indeed rendering a <input type="image" .../> tag. I am converting a non-struts application
to struts and the original JSP has width and height attributes for the tag. But indeed, it seems that according to HTML specification those attributes do not exist. I wonder why not, as <img> tag does have them?



From: "Robert Taylor" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: Height and width missing from <html:image>
Date: Thu, 2 Sep 2004 07:31:33 -0400

If you are using it to render an <img .../> then use
<html:img .../> which should have the appropriate attributes.
The <html:image .../> is for rendering <input type="image" .../>
which does not have the height and width attributes.

robert

> -----Original Message-----
> From: Janne Mattila [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 02, 2004 7:23 AM
> To: [EMAIL PROTECTED]
> Subject: Height and width missing from <html:image>
>
>
> Damn, why no width and height attributes for html:image? Disappointing.
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> ---------------------------------------------------------------------
> 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]


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



--------------------------------------------------------------------- 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