• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to resize an image dynamically in an html

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic