Line break in Label
when i m writing a long sentence in label without line break then it does wrap automatically. i m putting that 开发者_如何学Clabel in tag. how can i wrap that long sentence.
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>
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/
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.
精彩评论