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
Solved

Line Break in Button's Text

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS: How to get responsive tables to not be so spread out on desktop 5 42
Select case on click 3 20
html input 8 42
HTML <font style="color:red"> 9 32
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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 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 …

860 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