File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 63858

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!