.table-main {
    position: relative;
    max-width: 100%;
    z-index: auto;
    margin: auto;
    height: 100%; /*height: 785px;*/
    overflow-x: auto;
    overflow-y: auto;
}
.table-scroll {
    position: relative;
    max-width: 100%;
    z-index: auto;
    margin: auto;
    overflow-x: auto;
    overflow-y: auto; /*overflow-y:scroll;*/
    height: 100%;/*350px; height: 355px;*/
}
.table-main table, .table-scroll table {
    width: 100%;
    margin: auto;
    border-collapse: separate;
    border-spacing: 0;
}
.table-wrap {
    position: relative;
}
.table-main th, .table-main td, .table-scroll th, .table-scroll td {
    padding: 5px 10px;
    border: 1px solid #000;
    background: #fff;
    vertical-align: middle;
    text-align: center;
}
.table-main tbody th, .table-scroll tbody th {
    text-align: left;
}
.table-main thead, .table-main thead th, .table-main thead td {
    background: gold; /*#000;*/
    color: black; /*#fff;*/
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    text-align: center;
}
/* safari and ios need the tfoot itself to be position:sticky also */
.table-main tfoot, .table-main tfoot th, .table-main tfoot td {
    background: gold; /*#000;*/
    color: black; /*#fff;*/
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    text-align: center;
}
.table-scroll thead, .table-scroll thead th, .table-scroll thead td {
    background: lightgray; /*#000;*/
    color: black; /*#fff;*/
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    text-align: center;
}
/* safari and ios need the tfoot itself to be position:sticky also */
.table-scroll tfoot, .table-scroll tfoot th, .table-scroll tfoot td {
    background: lightgray; /*#666;*/
    color: black; /*#fff;*/
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
    text-align: center;
}