Sách CSS/Phần tử/Thuộc tính bảng (table)

Tủ sách mở Wikibooks

Thuộc tính bảng(table)[sửa]

    • border-collapse:collapse|separate
      • che lấp đường viền:che lấp|ngăn cách
    • border-spacing:length length
      • cách khoảng đường viền:dài
    • caption-side:top|bottom|left|right
      • che lấp đường viền:đỉnh |đáy|trái|phải
    • empty-cells:show|hide
      • ô trống:hiện|ẩn
    • table-layout:auto|fixed
      • bố trí bảng:tự động|cố định

Thí dụ[sửa]

table.one
{
  table-layout: automatic
}

table.two
{
  table-layout: fixed
}

table
{
  border-collapse: separate;
  empty-cells: show
}

table.coll 
{
  border-collapse: collapse
}

table.sep
{
  border-collapse: separate
}

table.one 
{
  border-collapse: separate;
  border-spacing: 10px
}
table.two
{
  border-collapse: separate;
  border-spacing: 10px 50px
}

caption
{
  caption-side:bottom
}