-2
* {
font-family: arial;
}
body {
padding: 0;
margin: 0;
}
.escopo {
width: 100%;
height: 200px;
background-color: yellow;
}
.margem_escopo {
width: 1000px;
height: 200px;
margin: auto;
}
.tabela {
border: 1px solid;
width: 350px;
height: 198px;
background-color: red;
margin: auto;
}
.style_tabela {
margin: auto;
}
td {
border: 1px solid;
}
tr {
border: 1px solid;
}
td.verde:hover{
background-color: green;
/*display: block;*/
}
table.style_tabela {
border-collapse: collapse;
}
<!DOCTYPE html>
<html lang = "pt-br">
<head>
<meta charset = "UTF-8"/>
<title>Cabeçalho</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class = "escopo">
<div class = "margem_escopo">
<div class = "tabela">
<table class = "style_tabela" >
<tr>
<td class = "verde">Gomo</td>
<td>Tesla</td>
<td>Riuta</td>
<td>Ferna</td>
<td>Romã</td>
<td>Célula</td>
<td>Atacado</td>
</tr>
<tr>
<td>Gomo</td>
<td>Tesão</td>
<td>Riuta</td>
<td>Ferna</td>
<td>Romã</td>
<td>Célula</td>
<td>Atacado</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
I wanted him to stay that way...
I await your return!
Julio, your CSS code doesn’t have any
line-height
being defined.– fernandosavio
Exactly. When I put in any DIV of the TABLE tag it gets weird. Just insert that you will see.
– Julio Rodrigues
I learned that it was to align vertically texts. How should I do with this table?
– Julio Rodrigues
Have you ever thought about using the display: flex;?
– Luis Faconi
I can insert directly into the CLASS DIV that holds the table?
– Julio Rodrigues
Look at the answer I put, I think it helps you!
– Luis Faconi
You want to align what? The table in the center of the
<div>
vertically? .– fernandosavio