CSS border-spacing property digunakan pada elemen table dan berfungsi untuk mengatur jarak antara bagian elemen table (cell) dengan border table. Penggunaan spacing property hanya bisa digunakan untuk deklarasi border-collapse:separate; dan tidak untuk nilai yang lain (contoh:collapse).
Declaration
border-spacing: value; border-spacing: <length>; border-spacing: LEFT-RIGHT-TOP-BOTTOM; border-spacing: ...px; border-spacing: ...em; border-spacing: <length> | <length>; border-spacing: LEFT-RIGHT | TOP-BOTTOM; border-spacing: ..px | ..px; border-spacing: ..em | ..em;
Contoh border-spacing pada elemen/syntax css
<style type="text/css">
table.contoh{
border-spacing:10px;
}
</style>
<table class="contoh" border=4>
<tr>
<td>Content here!</td>
<td>Content here!</td>
</tr>
</table>Di bawah ini telah disertakan demo penggunaan border-spacing property pada elemen table. Edit dan lihat perubahan yang terjadi dengan merubah nilai border-spacing property.
Please click the button to display. Continue with editing code and click to see the results!


Terimakasih.. sangat membantu.. :)
BalasHapus