Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts

    A new line in a button value?

    I would like to make the value of a button appear in two lines. Can this be done? I tried the \n but that worked perfectly to add \n to the value.

    Thanks!
    Scott Stewart
    Always happy to learn from pros.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    methinks you'll have to use a <button> for that:

    <button>Hello<br>World</button>

    cant seem to make <input type="button">'s wrap even if i set specific padding/width/height:

    eg: <input type="button" value="Hello World" style="width: 50px; height: 50px; padding: 10px;">
    does not wrap (tested ie6)

    hmm...
    redhead

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Posts
    567
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Excelent! Still allows the onClick method so I didn't care if it was an input or not. Honestly I didn't know there was a button tag. I use the w3c reference all the time and just haven't seen it. Now I have two lines AND an image!

    Thanks again
    Scott Stewart
    Always happy to learn from pros.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    IE5.5+ I believe. There's a better way that displays in all but I forget how it's done.
    Last edited by zoobie; 12-18-2002 at 11:37 AM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #5
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yea <button></button> isnt widely supported yet

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ames, IA, USA
    Posts
    373
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could try this: value="Hello& #10;World"

    You'll need to take out the space between the & and the # (I put the space in so the characters would display).
    Need more emoticons?
    Visit Catman's Private Stock

  • #7
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yup that works, good idea

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I think that was it...&amp;#10;
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •