Solved

Line Break in Button's Text

Posted on 2001-06-29
5
199 Views
Last Modified: 2010-05-18
I would like the have a line breat in a button test.  Instead of this

 -----------------------------------------
| This needs a break here. Did it get it? |
 -----------------------------------------

I want this;

 ----------------------------------------
|        This needs a break here.       |
|          Did it get it?               |
 ----------------------------------------


Here's the code;

<input type="button" name="cmdBreak" value="This needs a break here. Did it get it?" width="125" height="200" style="height:200">

Any Ideas?
0
Comment
Question by:khagen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 9

Accepted Solution

by:
TTom earned 55 total points
ID: 6239777
Use a character entity:

value="This needs a break here.&#10;Did it get it?"

Worked for me with IE 5.5.

Tom
0
 
LVL 10

Expert Comment

by:dij8
ID: 6240068
Or
value="This needs a break here.&#13;Did it get it?"

10 is carriage return and 13 is line feed (or the other way round).

You can even include them both if you want to make sure of platform and browser support.
value="This needs a break here.&#10;&#13;Did it get it?"
0
 
LVL 9

Expert Comment

by:TTom
ID: 6240656
10 is line feed.
0
 

Expert Comment

by:jgeoff
ID: 6245352

Or you could just design a button image however you want and use that as your submit button...

<INPUT NAME="submit" TYPE="IMAGE" SRC="http://www.your-server.com/path/to/your.gif" HEIGHT=72 WIDTH=72 BORDER=0>

~JG

0
 
LVL 9

Expert Comment

by:TTom
ID: 6252905
Thanks!

Tom
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Find out what you should include to make the best professional email signature for your organization.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question