• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

How to resize an image over button in an html depending upon the text over it.

 
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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why don;t you change the image if you are in a German locale?

Eric
 
Marshal
Posts: 67279
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me get this straight. You want to use an image rather than a button, so you're floating an inage over the button?

Why not just use an element that shows an image in the first place?
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!