DataTables Padding Top 0如何设置

时间:2014-12-17 09:22:56

标签: html css datatables

我有3个DataTables表。他们的ID是#example2,#example2,#example3。

我有填充前0的问题,我想设置填充前0,但在尝试了很多个小时后我筋疲力尽。

My Image

MARKUP:

<table>
    <tr>
        <td width="850px">
            <div></div>
            <div>
                <table id="example2" class="display" cellspacing="0">
                    <thead>
                        <tr>
                            <th></th>
                            <th></th>
                            <th></th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>
                                <td></td>
                                <td></td>
                                <td>
                                    <table>{
                                        <tr>
                                            <td></td>
                                        </tr>}</table>
                                </td>
                        </tr>}</tbody>
                </table>
            </div>
            </td>
            <td class="padding" width="850px">
                <div></div>
                <div>
                    <table id="example3" class="display" cellpadding="0px">
                        <thead>
                            <tr>
                                <th></th>
                                <th></th>
                                <th></th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td>
                                    <table>
                                        <tr>
                                            <td></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </td>
            <td width="850px">
                <div></div>
                <div>
                    <table id="example4" class="display" cellspacing="0">
                        <thead>
                            <tr>
                                <th></th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td></td>
                                <td></td>
                                <table>
                                    <tr>
                                        <td </td>
                                    </tr>
                                </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </td>
    </tr>
</table>

CSS:

   <style> td.padding {
       padding-top: 0cm;
   }
   </style> <style> table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
       border-top: 1px solid #D7E4DB;
       border-bottom: 1px solid #D7E4DB;
   }
   </style> <style> #example.dataTable {
       margin-left: 0px !important;
       margin-right: 0px !important;
       margin-bottom: 0px !important;
       margin-top: 0px !important;
       text-align: center;
   }
   </style> <style> #example_filter.dataTables_filter {
       width: 100%;
       /*float: left;*/
       text-align: center;
   }
   .DTTT_container {
       width: 100%;
       /*float: left;*/
       text-align: center;
   }
   #example.dataTable {
       margin-top: 0px !important;
       text-align: center;
       margin-left: auto;
       margin-right: auto;
   }
   .dataTable {
       margin-top: 0px !important;
       text-align: center;
       margin-left: auto;
       margin-right: auto;
   }
   #example.display.dataTable {
       margin-top: 0px !important;
       text-align: center;
       margin-left: auto;
       margin-right: auto;
   }
   table.dataTable {
       width: 100%;
   }
   </style>

0 个答案:

没有答案