【问题标题】:making the gridview smaller using bootstrap stylesheet使用引导样式表使 gridview 更小
【发布时间】:2021-11-12 16:38:33
【问题描述】:

我想使用引导样式表使 asp.net Web 表单中的 Gridview 更小并居中。以下是我的代码:

      <table class="table table-sm " >
                       
                <asp:GridView   ID="grdTest"  runat="server" GridLines="Horizontal"  CssClass="table  table-sm table-bordered table-condensed table-responsive-sm table-hover table-striped" >   
                </asp:GridView>
                            
                        </table>

下面是引导表的图像:

我怎样才能使它更小并在屏幕上居中?现在,它正在拉伸整个内容页面。

我们将不胜感激。

【问题讨论】:

    标签: html css bootstrap-4 flexbox


    【解决方案1】:

    'table-responsive'

    给它一个包装器
    <div class="table-responsive">
      <table class="table">
    ...
     </table>
    </div>
    

    【讨论】:

    • 当我把表响应的包装器作为包装器。我可以看到桌子实际宽度的轮廓,但实际桌子被挤在角落里。有什么办法可以解决这个问题。
    猜你喜欢
    • 1970-01-01
    • 2014-02-10
    • 2021-08-23
    • 2019-03-21
    • 1970-01-01
    • 2013-11-04
    • 2012-12-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多