2012-04-30 119 views
0

我正在使用浮动来排列布局。正确排列浮动HTML元素

<style> 
div { 
    float: left; 
} 

.pro { 
    width : 100px; 
    color : blue; 
} 
</style> 

<span> 
<div class="pro">Long property name : </div> 
<div>value</div> 
</span> 

当“Long property name:”溢出到新行时,我希望“value”也转到新行。我应该在这个HTML代码中做什么?谢谢。目前“价值”仍然居于榜首。

当前结果

Current result

我想

enter image description here

感谢

+0

好的,刚刚学会了这样做。谢谢。 – William

回答