表格的标题如何浮动到左边?caption-side和align都不起作用,这是什么原因呢。

解决方案 »

  1.   

    首先看看表格标题的上一父标签是否定义了align或者与文字对其的相关属性。
      

  2.   


    <table>
         <caption>Simple API Access<br />Use API keys to identify your project when you do not need to access user data.<a href="#">Learn more</a></caption>
         <tr>...</tr>
    </table>
    #content table {
    width:726px;
    border:solid 1px #D2D2D2;
    cell-spacing:0;
    border-collapse:collapse;
    }
    #content table caption {
    caption-side:left;
    font-weight:bold;
    }
      

  3.   

    你可以试试 float 属性试试看,希望对你有帮助