Uchycení řádku a sloupce v tabulce
This commit is contained in:
parent
c130ab8426
commit
b4c693a9ab
2 changed files with 33 additions and 2 deletions
|
@ -1243,6 +1243,35 @@ div.gdpr {
|
|||
background: rgb(253, 237, 213);
|
||||
}
|
||||
|
||||
/*Přichycování prvního sloupce a řádku*/
|
||||
.dosla_reseni {
|
||||
display: block;
|
||||
max-height: 90vh;
|
||||
max-width: 90vw;
|
||||
overflow: auto;
|
||||
margin-left: 5vw;
|
||||
}
|
||||
|
||||
.dosla_reseni thead tr {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.dosla_reseni tr:nth-child(even) td:first-child, .dosla_reseni thead tr, .dosla_reseni thead tr:first-child td:first-child {
|
||||
background: rgb(253, 237, 213);
|
||||
}
|
||||
|
||||
.dosla_reseni tr:nth-child(odd) td:first-child {
|
||||
background: #fffbf6;
|
||||
}
|
||||
|
||||
.dosla_reseni tr td:first-child {
|
||||
position: sticky;
|
||||
left: 0;
|
||||
}
|
||||
/* */
|
||||
|
||||
|
||||
.odevzdana_reseni tr th, .odevzdana_reseni tr td {
|
||||
border: 1px solid black;
|
||||
|
|
|
@ -21,8 +21,8 @@ Do data (včetně): {{ filtr.reseni_do }}
|
|||
<input type=submit value="Změň ročník">
|
||||
</form>
|
||||
|
||||
<div style="overflow-x: scroll;">
|
||||
<table class="dosla_reseni">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td> {# Prázdná buňka v levém horním rohu #}
|
||||
{% for p in problemy %}
|
||||
|
@ -32,6 +32,8 @@ Do data (včetně): {{ filtr.reseni_do }}
|
|||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for resitel,hodnoty in radky%}
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -52,8 +54,8 @@ Do data (včetně): {{ filtr.reseni_do }}
|
|||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue