Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extra space on submit buttons

Status
Not open for further replies.

gregaug

Programmer
Sep 9, 2005
61
US
hello,

I have a couple submit buttons that have long values in them, and then there's a lot of useless space before and after the values, making the buttons extra big. Is there some way of removing this extra space? I have the creations of the buttons in a perl subroutine because they're called so often, so if there's some way other than saying width="some pixel amount", I'd really appreciate it. Thanks for any help.
 
Try:

Code:
<input type="submit" style="padding:0px;" value="Some text here" />

Failing that, try:

Code:
<input type="submit" style="padding:0px; width:auto" value="Some text here" />

and failing that, try

Code:
<input type="submit" style="padding:0px; width:10em" value="Some text here" />

(changing 10 to be whatever value you need).

However, be warned that some browsers and some operating systems do not give you muc flexibility. See here:


and here:


for more information:

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top