/***************************sticky table header*****************************************/
.kn-table-wrapper {
max-height: 31.25rem; /*control the height of the grid*/
overflow-y: auto;
border: 0.0625rem solid #ccc;
}
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 0.0625rem solid #ccc;
}
thead {
position: sticky;
top: 0;
background-color: #f8f8f8;
z-index: 1;
transition: background-color 0.3s ease;
}
/* Optional hover/scroll feedback */
.kn-table-wrapper:hover thead th {
background-color: #0077b6 !important;
color: white;
}
The following CSS applies styling universally to all grid components within the Knack application.
To customize styling for a specific view, prepend each rule with its corresponding #view_xxx
identifier