html - table width not adaptive in IE -
table not displaying full-width in ie explorer. how make table's width not depend on column width, e.g., 100px*3, depend on window width?
css code:
table {     border-collapse: collapse;     border-spacing: 0;     background-color: transparent;     width: 100%;     table-layout: fixed; }   html code:
    <table class="table table-hover table-bordered">         <thead>             <tr>                 <th style="width: 100px;">xxx</th>                 <th style="width: 100px;">xxx</th>                 <th style="width: 100px;">xxx</th>             </tr>         </thead>         <tbody>             <tr>                 <td></td>                 <td></td>                 <td></td>             </tr>             <tbody>     </table>   notice problem doesn't exist in chrome or firefox.
try put width attribute in table 100%
<table width="100%" class="table table-hover table-bordered">  <thead>             <tr>                 <th style="width: 100px;">xxx</th>                 <th style="width: 100px;">xxx</th>                 <th style="width: 100px;">xxx</th>             </tr>         </thead>         <tbody>             <tr>                 <td></td>                 <td></td>                 <td></td>             </tr>             <tbody>     </table>      
Comments
Post a Comment