How do you specify table padding in CSS? ( table, not cell padding )

前端 未结 12 1318
我在风中等你
我在风中等你 2020-12-15 02:18

I have a table with a colored background and I need to specify the padding between the table and it\'s content, I.E. cells.
The table tag doesn\'t seem to accept a paddi

12条回答
  •  自闭症患者
    2020-12-15 02:59

    The easiest/best supported method is to use

    The css way: border-spacing (not supported by IE I don't think)

        
        
        
        
    foobar

Edit: if you just want to pad the cell content, and not space them you can simply use

OR

td {
    padding: 10px;
}

提交回复
热议问题