?
Solved

Line Break in Button's Text

Posted on 2001-06-29
5
Medium Priority
?
201 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 220 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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Suggested Courses

764 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