Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to resize an image dynamically in an html  RSS feed

 
Satish Kumar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using html:submit in my jsp. I am using a CSS to dynamically get an image which overlaps this submit button and give it a descent look.

the code in jsp is:
<html:submit property="method" styleClass="adminLongButton"
titleKey="label.submit">
<bean:message key="method.disputeorvalidate" /></html:submit>

and the css is

.adminLongButton
{
background: url(../img/buttonscss/BtnSubmit.gif); width: 56px;height:18px;background-repeat:no-repeat; font-family: arial; font-weight: bold; font-size:11px; color: #855cad; border-style: none;
}

My problem is that the image does not resize with the text as the html:submit normally does without the styleClass.
So whe my text in the jsp changes with the i18n the text is sometimes larger than the image size say in case of GERMAN locale. CAn somebody help me with this. I want to resize the image lying above the submit button depending upon the text coming in. There should be some property of the CSS that should be able to help me with this.
 
Nathan Hook
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web Services might not be the correct location for this questions, but when we've worked with images and buttons, we've always had to make the images way bigger then the button it was being placed on. Using a larger image then the button allows the button to grow due to language or a user increasing their text size on their browser. Hope this helps.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!