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.
+1
A:
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>
Dustin Laine
2010-05-26 19:14:30
+1
A:
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/
Pranay Rana
2010-05-26 19:14:49
What is break- word?Explain it.
picnic4u
2010-05-26 19:20:01
check the link posted in ans for more detail
Pranay Rana
2010-05-26 19:25:23
Not familiar with ASP.NET, but since it uses the main framework still, can't you use the word-wrap property of the control? Or, set the control to be a multi-line label (Might be thinking of TextBox here...). Either way, WordWrap property should work too?
Zack
2010-05-26 20:12:50
A:
I'd hesitate to use the CSS3 solution without some kind of IE fallback.
You need to add the following CSS to your label:
label { display: block; width: 100px; }
Then change the width to the width you'd like your label to be and the sentence will wrap within the space.
By default a label has inline display which makes width control difficult.
If you still need the label to be inline with your input field, float the label.
sitesbyjoe
2010-05-26 19:52:09