如何取消.table宽度:100%在bootstrap css中

Ary*_*itz 1 css twitter-bootstrap

我想让我的桌子不占用所有空间.在我bootstrap.css,我有:

.table {
    width: 100%
...
Run Code Online (Sandbox Code Playgroud)

在Chrome开发者工具中,我取消它并且表格缩小了.
如何在不修改引导程序文件的情况下在CSS文件中覆盖它.
谢谢

Jam*_*lly 5

  1. 确保在HTML中的Bootstrap 之后包含您自己的样式表.
  2. width通过在样式表中将.table's width' 设置为'auto'来覆盖Bootstrap的100%样式声明:

    .table {
      width: auto;
    }
    
    Run Code Online (Sandbox Code Playgroud)