【问题标题】:Bootstrap 4 table td width size customizeBootstrap 4 表 td 宽度尺寸自定义
【发布时间】:2019-01-24 18:04:47
【问题描述】:

我需要增加评分栏的宽度,但我的 w-9 不起作用。我想扩大评分栏。

这是我的餐桌代码:

 <table class="table table-bordered stick-top">
                <thead class="text-center" id="data">
                    <tr>
                        <th></th>
                        <th>Questions</th>
                        <th id="try">Rating</th>
                    </tr>
                </thead>
                <tbody class="body_data">
                    <?php 
                        $jio=mysqli_query($conn,"SELECT * FROM question")or die ("error");
                        while(list($Question_ID,$Question_Description)=mysqli_fetch_array($jio))
                        { ?>
                            <tr>
                            <td><?php echo $Question_ID; ?></td>
                            <td><?php echo $Question_Description; ?> </td>

                            <?php
                            $q1 = "SELECT * FROM rating ORDER BY Rating_ID ASC";
                            $r1 = $conn -> query($q1);
                            echo "<td class='w-9'";
                            while($row = $r1 -> fetch_object()){
                                echo "<input id='radio' type='radio' name='radio$Question_ID' value='" . $row -> Rating_ID . "' required>". $row -> Rating_ID;"";
                            }
                            echo "</td>";
                             ?>
                            </tr>
                        <?php } ?>

                </tbody>
            </table>

【问题讨论】:

    标签: php css html-table bootstrap-4


    【解决方案1】:

    如果您在 Sizing doc 查看 Bootstrap Doc,您会发现它们已包含对 25%、50%、75%、100% 和 auto 的支持,所以基本上当您使用 w-9 类时是空的

    因此,如果您无法修改 css 文件,则需要将以下属性放在 td 标签内:

    <td  style="width:9%">
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-12-26
      • 1970-01-01
      • 1970-01-01
      • 2021-12-11
      • 2020-01-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多