<input type="button"> -- setting size

Discussion in 'HTML' started by Robert Mark Bram, Feb 16, 2004.

  1. Howdy All!

    How can I set the size of an input button? It seems that the size attribute
    defines a limit for text fields only..

    Rob
    :)
     
    Robert Mark Bram, Feb 16, 2004
    #1
    1. Advertising

  2. Robert Mark Bram

    mscir Guest

    Robert Mark Bram wrote:

    > Howdy All!
    >
    > How can I set the size of an input button? It seems that the size attribute
    > defines a limit for text fields only..


    To make the button wider than default, try padding the button text with
    spaces.

    <input type="submit" value=" Submit " name="btnsubmit">
     
    mscir, Feb 16, 2004
    #2
    1. Advertising

  3. Robert Mark Bram

    mscir Guest

    mscir wrote:

    > Robert Mark Bram wrote:
    >
    >> Howdy All!
    >>
    >> How can I set the size of an input button? It seems that the size
    >> attribute
    >> defines a limit for text fields only..

    >
    >
    > To make the button wider than default, try padding the button text with
    > spaces.
    >
    > <input type="submit" value=" Submit " name="btnsubmit">


    Oops... just found this:

    http://www.javascriptkit.com/howto/button2.shtml
     
    mscir, Feb 16, 2004
    #3
  4. "Robert Mark Bram" <> skrev i melding
    news:403010be$0$4260$...
    > Howdy All!
    >
    > How can I set the size of an input button? It seems that the size

    attribute
    > defines a limit for text fields only..


    Simple: use CSS.

    Example:
    <input type="button" style="width: 100px" value="Wide button" />

    http://www.w3schools.com/css/pr_dim_width.asp
    http://www.w3schools.com/css/css_units.asp

    --
    Kim André Akerø
    -
    (remove NOSPAM to contact me directly)
     
    Kim André Akerø, Feb 16, 2004
    #4
  5. Robert Mark Bram

    Paul Furman Guest

    Kim André Akerø wrote:
    > "Robert Mark Bram" ...
    >>
    >>How can I set the size of an input button?

    >
    > style="width: 100px" value="Wide button"




    What about making them smaller? Or to match the default text size at
    least. On my setup the ones I create are huge compared to default text.
     
    Paul Furman, Feb 16, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CJ
    Replies:
    1
    Views:
    1,575
    Andrew Thompson
    Oct 29, 2004
  2. Jason Cavett

    Preferred Size, Minimum Size, Size

    Jason Cavett, May 23, 2008, in forum: Java
    Replies:
    5
    Views:
    12,588
    Michael Jung
    May 25, 2008
  3. Sam
    Replies:
    1
    Views:
    1,125
    Brian Kenneth Nielsen
    Nov 25, 2008
  4. Ron Brennan
    Replies:
    5
    Views:
    316
    Dr John Stockton
    May 14, 2004
  5. jodleren

    Getting picture size/setting window size

    jodleren, Feb 14, 2007, in forum: Javascript
    Replies:
    2
    Views:
    160
    jodleren
    Feb 15, 2007
Loading...

Share This Page