Sometimes, we want to add table cell margin with CSS.
In tyhis article, we’ll look at how to add table cell margin with CSS.
How to add table cell margin with CSS?
To add table cell margin with CSS, we set the border-collapse and border-spacing propeties.
For instance, we write
table {
border-collapse: separate;
border-spacing: 2px;
}
to set cell margin with border-spacing: 2px;
And we add border-collapse: separate;
to let us apply the border-spacing style.
Conclusion
To add table cell margin with CSS, we set the border-collapse and border-spacing propeties.