缩进标签和复选框,标签外的复选框和长标签

时间:2013-04-18 10:54:02

标签: html css

不幸的是,我坚持使用旧程序来生成表单,但我可以使用CSS。该程序生成以下html:

<input type="checkbox" name="_QStrategy_QV03_CV02" id="_Q2_C1" class="mrMultiple" style="" value="V02">
<label for="_Q2_C1">
<span class="mrMultipleText" style="">Defining the finance operating model to align with and support the execution of the organisation’s broader strategy. A finance operating model is a description of how an the finance function’s people, process and technology interacts internally and externally to deliver products and services.</span>
</label>

标签长并包裹到下一行,下一行的文字直接位于复选框下方。我怎样才能使包装文本缩进?

2 个答案:

答案 0 :(得分:4)

浮动元素,其宽度指定为

label{float:left;width: 75%;}
input[type="checkbox"]{float:left;width:20px}

请参阅fiddle

答案 1 :(得分:1)

试试这个css

.mrMultipleText
{
    width:75%;
    float:left;
}
.mrMultiple
{
    float:left;
}

请参阅此fiddle