2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

border-collapseが効かない

Posted at

#border-collapseが効かない
tableを普通に作るとセルとセルの間に隙間ができてしまう。
それを防ぐために

table{
  border-collapse: collapse;
}

を書くのだが、なぜか隙間がうまらなかった。
たくさん調べたのだが、

タグを使って場合はcollapseは無効になるらしい。
だが今回は何の変哲もないtableだった。

#separateとborder-spacingを併用して隙間をなくす
こうすればよい。
あえて隙間を作って(seprate)、隙間をなくす(border-spacing)

table{
  border-collapse: seprate;
  border-spacing:0px;
}

簡素な記事ですみません。

2
2
0

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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?