LoginSignup
0
0

More than 3 years have passed since last update.

tableのcellの間隔を開ける

Posted at

tabelの子要素同士(td,th)の間隔を開ける方法

table {
       border-collapse: separate;
       border-spacing: 20px 0;
}

tableに上記のプロパティをセットする。

border-spacingの上下左右の指定方法が、marginやpaddingとは順序が逆なので注意

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