内容无法滚动 - HTML - CSS

时间:2016-11-10 08:22:49

标签: html css

我的网页视图在内容中使用了dataTable插件。但是当数据不再适合显示在屏幕上时,内容无法滚动。

The red box is the cannot that cannot be scrolling

HTML

<div class="landing">           
    <div class="wrap mainbar-new">
        <div class="why-container">
            <div class="table-responsive">
                <table class="table table-striped table-bordered table-hover" id="table">
                    <thead>
                        <tr>
                            <th align="center">No</th>
                            <th align="center">Time</th>
                            <th align="center">User</th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php $no=1;
                        foreach($data as $row):?>
                            <tr>
                                <td align="center"><?php echo $no;?></td>
                                <td align="center"><?php echo date("d/m/Y", strtotime($row->time));?></td>
                                <td align="center"><?php echo $row->user;?></td>
                            </tr>
                        <?php $no++;
                        endforeach;?> 
                    </tbody>
                </table>
            </div>
        </div>                  
    </div>
</div>

CSS

.landing {
    background-color: #fff;
    padding-top: 10%;
    overflow: auto;
}

有人知道在这种情况下该怎么办?提前谢谢。

0 个答案:

没有答案