2014-01-30 48 views
1

我想讓桌子內的文字自動換行。約束是我無法更改HTML,因爲它是由服務器生成的。文字不會自動換行在桌子內

我創建了一個JSFiddle

如果它不工作:

<div style="width: 25%"> 
    <table class="af_selectManyCheckbox" id="pt1:r1:1:smc1" cellpadding="0" cellspacing="0" border="0"> 
     <tbody> 
      <tr> 
       <td class="af_selectManyCheckbox_label" valign="top"/> 
       <td valign="top" class="AFContentCell" nowrap=""> 
        <div class="af_selectManyCheckbox_content"> 
         <div> 
          <span class="af_selectManyCheckbox_content-input"> 
           <input class="af_selectManyCheckbox_native-input" type="checkbox" value="0"/> 
          </span> 
          <label class="af_selectManyCheckbox_item-text">It allows a component to partially refresh another component whose partialSubmit property is set to true.</label> 
         </div> 
        </div> 
       </td> 
      </tr> 
     </tbody> 
    </table> 
</div> 

回答

5

在這裏你去。

WORKING DEMO

CSS代碼:

.col-md-3 label { 
    white-space: normal; 
} 

希望這有助於。