Label Text And the css styles are: fieldset span.formrow label." /> Label Text And the css styles are: fieldset span.formrow label." /> Label Text And the css styles are: fieldset span.formrow label."/>

Wrapping text with css

4.1k Views Asked by At

I have the following html:

<label class="description">Label Text</label><input type="password" />

And the css styles are:

fieldset span.formrow label.description {
    width: 150px;
    display: -moz-inline-box;
    display: inline-block;
}

My problem is that in Firefox 2 if the text goes over the 150px limit, then the line does not break. Instead the text is displayed behind the input text field.

Any chance that the behavior can be altered?

2

There are 2 best solutions below

0
REA_ANDREW On BEST ANSWER
fieldset span.formrow label.description { 
  width: 150px; 
  float:left;
  clear:left; 
}

Try this!

Andrew

2
Thody On

Try:

fieldset span.formrow label.description { width: 150px; display: block; float: left; }