小编Tim*_*m W的帖子

数据表标题在页面加载时不是全宽

使用数据表加载我的Web应用程序页面时,会加载数据表,但该<thead>行不是表的全宽.

编辑数据或在数据表搜索中搜索后,标题跳转到全宽.见图.

有什么解决方案或解决方法吗?

数据表截图:

数据表的屏幕截图

我的常规数据表很好,但是这个数据表在一个模态中加载.代码模式:

<!-- Get selected shops modal -->
<div id="SelectedShopsModal" class="infomodal">
    <div class="shops-content">
        <h2><span class="closeModalSelectedShops">&times;</span> <?php echo lang('Shops'); ?></h2>
        <div class="detailblock">
            <table id="DataListTableSelectedShops" class="display" cellspacing="0" width="100%">
                <thead>
                    <th class="OE"><?php echo lang('Shop_No'); ?></th>
                    <th class="OE"><?php echo lang('Shop_Name'); ?></th>
                    <th class="OE"><?php echo lang('Shop_District'); ?></th>
                </thead>
                <tbody>
                    <?php foreach($selected_shops as $shop){
                        echo "<tr><td>" . $shop['Shop'] . "</td><td>" . $shop['Name'] . "</td><td>" . $shop['District'] . "</td></tr>";
                    } ?>
                </tbody>
            </table>
            <br /><button class="closeBtnSelectedShops btn red"><?php echo lang('Close'); ?></button>
            <button …
Run Code Online (Sandbox Code Playgroud)

javascript header modal-dialog datatables

5
推荐指数
1
解决办法
3490
查看次数

标签 统计

datatables ×1

header ×1

javascript ×1

modal-dialog ×1