Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Line break in Label

Tags:

html

css

asp.net

when i m writing a long sentence in label without line break then it does wrap automatically. i m putting that label in tag. how can i wrap that long sentence.

like image 583
Piyush Avatar asked May 26 '10 19:05

Piyush


People also ask

How do you break a line in a label?

You can insert line breaks in HTML with the <br> tag, which is equivalent to a carriage return on a keyboard.

How do you display a label with text with line breaks?

You can wrap your asp label in a pre tag, and it will display with whatever line breaks are set from the code behind. Save this answer. Show activity on this post. You can also use <br/> where you want to break the text.

What is the tag for a line break?

The <br> tag inserts a single line break. The <br> tag is useful for writing addresses or poems.

What is meant by line break?

Meaning of line break in Englishthe point where a line of text ends and a new line starts: All line breaks and paragraphs will be generated automatically. It wasn't the end of the paragraph, only a line break.


2 Answers

Unclear, but you can force a line break by adding a <br /> in it.

<label>Some long long long long long long<br /> long long long label</label>
like image 113
Dustin Laine Avatar answered Sep 28 '22 12:09

Dustin Laine


create style sheet like this "

.label { word-wrap: break-word }

and assign to you label

check the link for more detail : http://www.css3.com/css-word-break/

like image 32
Pranay Rana Avatar answered Sep 28 '22 12:09

Pranay Rana