CSS Examples: border-spacing

Examples

These cells have 5px of spacing all around them

These cells have 5px of horizontal spacing and 10px vertical

Styles Used

.horizontal {
	border-collapse: separate;
	border-spacing: 5px;
	border: 1px solid #000;
}

.both {
	border-collapse: separate;
	border-spacing: 5px 10px;
	border: 1px solid #000;
}