Solved

Line Break in Button's Text

Posted on 2001-06-29
5
191 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
Comment Utility
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
Comment Utility
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
Comment Utility
10 is line feed.
0
 

Expert Comment

by:jgeoff
Comment Utility

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
Comment Utility
Thanks!

Tom
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

763 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

8 Experts available now in Live!

Get 1:1 Help Now