Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)
The CSS 'border-spacing' property specifies the distance between the borders of adjacent table cells. Unlike table elements' cell padding attribute (now considered outdated HTML), 'border-spacing' applies only to CSS-styled tables with border-collapse set to separate. This property allows designers to control the spacing between table cells, enhancing table data's visual layout and readability.
See the Pen
CSS 'border-spacing' Property by Webzstore (@webzstore)
on CodePen. The 'border-spacing' property is essential for controlling the spacing between cells in CSS-styled tables, contributing to tabular data's aesthetic and functional presentation on web pages. Use 'border-spacing' to adjust the space between table cell borders. This property is particularly useful for creating more visually appealing tables by providing adequate space between cells, thus improving legibility and overall design. It can be specified using one or two values, where the first value defines the horizontal spacing, and the second value (if present) represents the vertical spacing.CSS 'border-spacing' Property Examples
Browser Support For 'border-spacing' Property
1.0 1.0 1.0 8.0 4.0 CSS Syntax of the 'border-spacing' Property
border-spacing: length | initial | inherit;
Usage of the 'border-spacing' Property
Property Values of the 'border-spacing' Property
"*" indicates required fields