2013-04-18 294 views
1

外的复选框不幸的是我坚持使用旧的程序生成的形式,但我可以用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> 

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

+1

能为您提供的jsfiddle什么? – David

+0

屏幕截图也有帮助。我不能完全制定出你想要什么样的影响...... – Beejamin

回答

4

,宽度浮动元素指定给他们

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

fiddle

+0

我标记下来,只是因为它,你有这种类型的选择的多个实例不尽快工作 - 在形式并不少见。内容开始环绕右侧列。 –

1

试试这个CSS

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

看到这个fiddle

+0

这会缩进所有文本,而不仅仅是包装的文本。 – gaynorvader