This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes how to set the size of a button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to set the size of a button " Watch "how to set the size of a button " New topic

how to set the size of a button

Narasimha Raju Naidu
Ranch Hand

Joined: Mar 23, 2007
Posts: 37
hi to all

i want to set a fixed size to a button which is not expand or not reduced based on the value. is it possible

Roger F. Gay
Ranch Hand

Joined: Feb 16, 2007
Posts: 408
It is possible if you use an image.

<input type="image" src="vxhtml.gif" alt="sized button" Height=100 Width=100 />

In simple web-browser buttons, you can adjust width with spaces, if you for example want a row of buttons to be the same width.

value=" Home "

You can try adjusting the font style property if you want some other height.
[ April 22, 2007: Message edited by: Roger F. Gay ]

Correlation does not prove causality.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63547

Specify the size using CSS.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: how to set the size of a button
It's not a secret anymore!