Skip to content

Instantly share code, notes, and snippets.

@kejariperak-sudo
Last active September 18, 2025 07:37
Show Gist options
  • Save kejariperak-sudo/45f4284851237d22af4bbfae77dd8b33 to your computer and use it in GitHub Desktop.
Save kejariperak-sudo/45f4284851237d22af4bbfae77dd8b33 to your computer and use it in GitHub Desktop.
Table Style
/* =======================
Custom CSS AwesomeTable
Sudut Baca Digital
======================= */
/* Cover kecil */
td[data-header="COVER"], th[data-header="COVER"] {
width: 60px !important;
max-width: 60px !important;
white-space: nowrap;
text-align: center;
}
/* Deskripsi fleksibel */
td[data-header="DESKRIPSI BUKU"], th[data-header="DESKRIPSI BUKU"] {
min-width: 400px;
width: auto !important;
max-width: 100% !important;
white-space: normal;
text-align: left;
word-wrap: break-word;
}
/* Lebarkan Judul Buku sedikit */
td[data-header="JUDUL BUKU"], th[data-header="JUDUL BUKU"] {
min-width: 200px;
}
/* 🎨 Styling tabel hijau modern */
table {
border-collapse: collapse;
width: 100%;
border-radius: 12px; /* sudut rounded */
overflow: hidden; /* biar radius kepake */
box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* shadow lembut */
margin-top: 10px;
}
th {
background-color: #2e7d32; /* hijau tua */
color: #ffffff; /* teks putih */
padding: 10px;
font-size: 14px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
td {
padding: 10px;
font-size: 14px;
line-height: 1.5;
}
/* Baris ganjil-genap */
tr:nth-child(even) {
background-color: #e8f5e9; /* hijau muda */
}
tr:nth-child(odd) {
background-color: #ffffff;
}
/* Hover efek */
tr:hover {
background-color: #c8e6c9; /* hijau highlight */
transition: 0.2s ease-in-out;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment