Solved

Line Break in Button's Text

Posted on 2001-06-29
5
194 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now