LoginSignup
0

More than 5 years have passed since last update.

Bootstrapsでボーダーレステーブルにする

Posted at

Railsでテンプレートをhaml形式で書いている場合の例ですが、Bootstrapsを使用してボーダーレステーブルにする場合まずtableクラスを追加してました。

%table.table

とかいて、ボーダレスなので

%table.table.table-no-border

table-no-borderクラスを追加してしまいます。

ところが、ここで線が消えないとなって慌ててググってcss追加してというのがいろいろ出てくるので、cssを書いてということを繰り返してきました。

が、なんとtableクラスを外すだけでいいというのを知りました。

%table.table-no-border

ただ、グリットのサイズに合わせてくれないので合わせたい場合は結局cssでということになっちゃうのでしょうか?


参照先
Bootstrap table without stripe / borders

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0