estilizando tabela e linhas
Olá pessoal estou tentando estilizar uma tabela assim como suas linhas porém para não ter que setar o atributo class em todas as linhas <td></td> eu estou usando este método css
table#tableFormulario {
background:#D1DCDF;
border:1px solid;
border-collapse:collapse;
}
table#tableFormulario thead th, tfoot th {
text-align:center;
}
table#tableFormulario thead th, tfoot th {
background:#305761;
font-weight:700;
padding-top:3px;
}
table#tableFormulario tbody th, tbody td {
text-align:left;
vertical-align:top;
}
/*table#tableFormulario tbody tr:hover {
background:#88839E;
}
*/
table#tableFormulario td, th {
border:1px dotted;
padding:5px;
}
/CORES/
table#tableFormulario table, thead th, tfoot th, tbody tr:hover, td, th {
border-color:#003D5F;
}
table#tableFormulario thead th, tfoot th, tbody tr:hover, tbody tr.par:hover {
/color:#FFF;/
}
Desta mandeira utilizando table#id_da_tabela + td, th eu consigo extender o estilo para todas as linhas ta tabela, meu problema é que tabelas que não tem o id='tableFormulario' também estão pegando es estilo isso é um problema pois gostaria de ter uma classes de estilo diferente para cada tabela e hoje está misturando.
Abaixo o código da tabela
<table id="tableFormulario" border="0" cellpadding="0" cellspacing="0" style="width:400px; margin:0 auto">
<thead>
<tr>
<th>Cabeçalho</th>
<th>bbb</th>
</tr>
</thead>
<tbody>
<tr>
<td>linha1</td>
<td>xxx</td>
</tr>
<tr>
<td>linha 2 </td>
<td>aaaa</td>
</tr>
</tbody>
</table>
Alguem sabe como resolver isso?
Discussão (4)
Carregando comentários...