Pablo
Pablo

Reputation: 2154

Wrapping text with css

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?

Upvotes: 1

Views: 4159

Answers (2)

REA_ANDREW
REA_ANDREW

Reputation: 10774

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

Try this!

Andrew

Upvotes: 1

Thody
Thody

Reputation: 1990

Try:

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

Upvotes: 1

Related Questions