dongzhi2014 2015-03-27 09:18
浏览 26

调整大小浏览器或在移动设备上运行时,如何不破坏表的布局

I have problem with table (html-bootstrap). When I resize the browser and then it has been broken Like image below:

Table Display at the first time, when i'm not resize browser enter image description here

After resize browser, It has got problem like this image enter image description here

This is my src html table and recently I have no solution for this, Plz help me to resolve it.

<div class="row">
      <div class="box col-md-12">
        <div class="box-inner">
        <div class="box-header well" data-original-title="">
        <h2><i class="glyphicon glyphicon-list"></i> TimeSheet List</h2>
        <div class="box-icon">
        <a href="#" class="btn btn-minimize btn-round btn-default"><i class="glyphicon glyphicon-chevron-up"></i></a>
      </div>
     </div>
    <div class="box-content">
     <table class="table table-bordered">
        <tbody>
            <tr>
                <th>TS ID</th>
                <th>Username</th>
                <th>Timesheet Date</th>
                <th>Date Approved</th>
                <th>From Time</th>
                <th>To Time</th>
                <th>Activity</th>
                <th>Division</th>
                <th>Department</th>
                <th>Approved By</th>
                <th colspan="2"><strong>Actions</th>
            </tr>
            <tr>
                <td rowspan="3">1</td>
                <td rowspan="3">Vasu</td>
                <td rowspan="3">2015-02-17</td>
                <td rowspan="3">2015-02-18</td>
                <td>08:30</td>
                <td>10:30</td>
                <td>CS8743</td>
                <td rowspan="3">Service</td>
                <td rowspan="3">Department 1</td>
                <td rowspan="3">Jimmy</td>
                <td colspan="2" rowspan="3">View</td>
            </tr>
            <tr>
                <td>10:30</td>
                <td>12:30</td>
                <td>CS3474</td>
            </tr>
            <tr>
                <td>13:30</td>
                <td>17:30</td>
                <td>Help</td>
            </tr>
            <tr>
                <td rowspan="2">2</td>
                <td rowspan="2">Jack</td>
                <td rowspan="2">2015-02-18</td>
                <td rowspan="2">2015-02-19</td>
                <td>08:30</td>
                <td>12:30</td>
                <td>Idle</td>
                <td rowspan="2">Hoseshop</td>
                <td rowspan="2">Department 2</td>
                <td rowspan="2">Jimmy</td>
                <td colspan="2" rowspan="2">View</td>
            </tr>
            <tr>
                <td>13:30</td>
                <td>17:30</td>
                <td>CS001</td>
            </tr>
            <tr>
                <td>3</td>
                <td>Tim</td>
                <td>2015-02-19</td>
                <td>2015-02-20</td>
                <td>08:30</td>
                <td>17:30</td>
                <td>CS002</td>
                <td>Driver</td>
                <td>Department 3</td>
                <td>Jimmy</td>
                <td colspan="2">View</td>
            </tr>
            <tr>
                <td>4</td>
                <td>Huey</td>
                <td>2015-02-20</td>
                <td>2015-02-21</td>
                <td>08:30</td>
                <td>17:30</td>
                <td>CS003</td>
                <td>Project</td>
                <td>Department 4</td>
                <td>Jimmy</td>
                <td colspan="2">View</td>
            </tr>
            <tr>
                <td>5</td>
                <td>Hudo</td>
                <td>2015-02-21</td>
                <td>2015-02-22</td>
                <td>08:30</td>
                <td>17:30</td>
                <td>Help</td>
                <td>Piping</td>
                <td>Department 5</td>
                <td>Jimmy</td>
                <td colspan="2">View</td>
            </tr>
          </tbody>
      </table>
     </div>
    </div>
   </div>
  </div>

Plz. Help me!

  • 写回答

2条回答 默认 最新

  • dongzhuanlei0768 2015-03-27 13:27
    关注

    Wrap the table in a div with the .table-responsive class. This will make the table scroll on smaller screens, but without making the whole page scroll.

    <div class="table-responsive">
        <table class="table table-bordered">...</table>
    </div>
    

    Docs: http://getbootstrap.com/css/#tables-responsive

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题