There are three places you might use Buttons, in Java, in HTML (Hypertext Markup Language) and in HTML forms.
In all three you can turn any image *.png, *.jpg or *.gif into a button background. Your problem is then finding or generating a button. There are lots of sites on the Web what will generate you glossy buttons in many styles. It is best to make sure you generate all the potential button you will ever need at one sitting. There is no guaranteed that style or even the website will be available in future.
In Java, simply changing the Look & feel can jazz up the buttons. In Java you can make the button change its look when pressed, hovered over, selected, disabled etc.
In CSS (Cascading Style Sheets) you can also use a generic long bar with gradient as your button image background. You just use a piece of it with overlaid bold white type.
There are two main kinds of buttons you use in forms, a button to submit the contents of your form and a button to print the page. Unfortunately I have not yet discovered how to print just the form.
But how can you make your buttons more interesting, like these:
Add the following to your style sheet:
If you want some buttons to look different from the others, apply style classes with <input class="xxx", and set up styles to match. The catch is IE (Internet Explorer) and Avant don’t understand the -moz or -webkit properties, and ignore the entire style, not just the parts they do not understand. It works fine in Chrome, Firefox, Safari and SeaMonkey. Opera does the colours but not the gradient.
One big advantage of creating your buttons with style sheets is Google Translate can translate the text to foreign languages. It cannot do that for *.png buttons.
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/fancybuttons.html | J:\mindprod\jgloss\fancybuttons.html | |
![]() | Please email your feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording,
broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.211] | |
| Feedback | You are visitor number 11. | |