1
I’m doing a web programming assignment, a story I have in high school. In this task I have to build a table of a schedule of football games, while doing I decided to increment the task with a tr:hover
in css, but I couldn’t block one of the tags tr
to receive the event without having to use the id in the tags I wanted the event.
tr:hover{
background-color: #606060;
}
th{
background-color: #707070;
}
td {
text-align: justify;
vertical-align: text-top;
}
tfoot td{
text-align: center;
}
<body>
<table border="1,5" width="90%" cellspacing="0">
<thead>
<caption>CRONOGRAMA DE JOGOS</caption>
</thead>
<tbody>
<tr>
<th>DATA - DIA</th>
<th>HORA</th>
<th>JOGO</th>
<th>ESTÁDIO</th>
<th>CIDADE</th>
<th>UF</th>
</tr>
<tr>
<td rowspan="5">18/07 - QUA</td><!--Esse td não pode ter o evento-->
<td>19:30</td>
<td>Ceará CE × Sport PE</td>
<td>Castelão</td>
<td>Fortaleza</td>
<td>CE</td>
</tr>
<tr>
<td>21:00</td>
<td>Vitória BA × Paraná PR</td>
<td>Manoel Barradas</td>
<td>Salvador</td>
<td>BA</td>
</tr>
<tr>
<td>21:45</td>
<td>Flamengo RJ × São Paulo SP</td>
<td>Maracanã</td>
<td>Rio de Janeiro</td>
<td>RJ</td>
</tr>
<tr>
<td>21:45</td>
<td>Corinthians SP × Botafogo RJ</td>
<td>Arena Corinthians</td>
<td>São Paulo</td>
<td>SP</td>
</tr>
<tr>
<td>21:45</td>
<td>Grêmio RS × Atlético MG</td>
<td>Arena do Grêmio</td>
<td>Porto Alegre</td>
<td>RS</td>
</tr>
<tr>
<td rowspan="5">19/07 - QUI</td><!--Esse também não-->
<td>19:30</td>
<td>Cruzeiro MG × América MG</td>
<td>Mineirão</td>
<td>Belo Horizonte</td>
<td>MG</td>
</tr>
<tr>
<td>19:30</td>
<td>Chapecoense SC × Bahia BA</td>
<td>Arena Condá</td>
<td>Chapecó</td>
<td>SC</td>
</tr>
<tr>
<td>20:00</td>
<td>Vasco da Gama × Fluminense RJ</td>
<td>São Januário</td>
<td>Rio de Janeiro</td>
<td>RJ</td>
</tr>
<tr>
<td>20:00</td>
<td>Santos SP × Palmeiras SP</td>
<td>Pacaembu</td>
<td>São Paulo</td>
<td>SP</td>
</tr>
<tr>
<td>21:00</td>
<td>Atlético PR × Internacional RS</td>
<td>Arena da Baixada</td>
<td>Curitiba</td>
<td>PR</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="6"><sub>Feito em 23/03/2021 às 22:00</sub></td>
</tr>
</tfoot>
</table>
</body>
"I couldn’t block one of the tags tr of receiving the event without having to use the id in the tags I wanted the event" and what is this TR? explain better
– Ricardo Pontual
You mean the first TD of TR? You don’t want the DIA cell to have the gray background?
– hugocsl
It would be the first td of the second tr and the first td of the seventh tr. Which are tds that occupy more than one line.
– Saymon R B Dos Santos
Exactly, the day cell can’t have the background changed, because as it occupies more than one line the event only works for it when it hovers the mouse in the first line, which is strange.
– Saymon R B Dos Santos