I have a form with limited width, however the label text maybe longer than form width, so the text was wrapped to multiple lines. My problem is that first line is indented b
You could do something like this:
HTML
Field 1 Field 2 Label, may be longer than normal, This is an example for this lorem lorem lorem lorem lorem lorem lorem lorem lorem lorem lorem Field 3 Normal long
CSS
.form { width: 300px; } .form ul { list-style:none; padding: 0; } .form ul li { overflow:hidden; } .form ul li.checkbox input { float:left; } .form ul li.checkbox label { float:right; width:270px; }
You can also use div's instead of an ul.
div
ul