struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Bathje <...@ntsource.com>
Subject Re: Height and width missing from <html:image>
Date Thu, 02 Sep 2004 13:36:06 GMT
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" <rtaylor@mulework.com>
>> Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
>> To: "Struts Users Mailing List" <user@struts.apache.org>
>> 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:janne4444_63@hotmail.com]
>> > Sent: Thursday, September 02, 2004 7:23 AM
>> > To: user@struts.apache.org
>> > 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: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
> http://join.msn.com/?page=features/featuredemail
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org


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


Mime
View raw message