html
  • html-table
  • width
  • 2015-10-29 64 views 0 likes 
    0

    如何設置小於1%的表格寬度?如何設置小於1%的表格寬度

    <div> 
     
    <table class='total_cost table no-margin' cellpadding="0" cellspacing="0" width="0.5%" style='background:#4A84CE; float:left; height:20px; padding:0px; border:none; border-spacing:0px; border-collapse:collapse;'> 
     
    <tr> 
     
        <td class='cost text-right fg-white employee-tooltip' cellpadding="0" cellspacing="0" style='padding:0px; border:none;border-spacing:0px; border-collapse:collapse; background:#F00' ></td> 
     
         </tr> 
     
    </table> 
     
    <span class="display_time"> 2 hours</span> 
     
    </div>

    +1

    嘗試用1%之間的任何寬度:寬度:0.25%;或者類似的東西。 –

    回答

    0

    將0%和類似0.25%,0.50%,0.75%

    <div> 
        <table class='total_cost table no-margin' cellpadding="0" cellspacing="0" width="0.50%" style='background:#4A84CE; float:left; height:20px; padding:0px; border:none; border-spacing:0px; border-collapse:collapse;'> 
        <tr> 
         <td class='cost text-right fg-white employee-tooltip' cellpadding="0" cellspacing="0" style='padding:0px; border:none;border-spacing:0px; border-collapse:collapse; background:#F00' ></td> 
          </tr> 
        </table> 
        <span class="display_time"> 2 hours</span> 
        </div> 
    
    +0

    爲什麼我把寬度= 0% – seven

    +0

    因爲你說你想要低於1%,我猜0%也低於1%,如果你想要大於0%,你可以使用0到1之間的任何東西,比如0.25%根據您的需要0.50%或0.75%。 –

    +0

    感謝大家的幫助。 – seven

    0

    <div> 
     
    <table class='total_cost table no-margin' cellpadding="0" cellspacing="0" width="0.1%" style='background:#4A84CE; float:left; height:20px; padding:0px; border:none; border-spacing:0px; border-collapse:collapse;'> 
     
    <tr> 
     
        <td class='cost text-right fg-white employee-tooltip' cellpadding="0" cellspacing="0" style='padding:0px; border:none;border-spacing:0px; border-collapse:collapse; background:#F00' ></td> 
     
         </tr> 
     
    </table> 
     
    <span class="display_time"> 2 hours</span> 
     
    </div>

    相關問題