5
I made a table in mine HTML
, but I couldn’t center it in the middle of the screen.
She’s vertical and I’ve tried putting the text-align:center
but it didn’t help.
td, th {
padding: .7em;
margin: 0;
/*border: 1px solid #ccc;*/
text-align: center;
}
th{
/*background-color: #EEE;*/
}
td{
font-weight:bold;
/*background-color: #EEE;*/
}
table{
width: 100%;
margin-bottom : .5em;
table-layout: fixed;
text-align: center;
}
<div class="container">
<div class="table-responsive">
<table class="table" width="200px" align="center">
<thead>
<tr class="status">
<th class="cor">Status:</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="container">
<div class="table-responsive">
<table class="table" width="200px" align="center">
<thead>
<tr class="cliente">
<th class="cor">Quantidade</th>
</tr>
<tr class="clientess">
<th class="cor">Nº.Pedido</th>
</tr>
<tr class="fiscal">
<th class="cor">Nota Fiscal</th>
</tr>
<tr class="entprevista">
<th class="cor">Entrega Prevista</th>
</tr>
</thead>
</table>
</div>
</div>
Ready. I edited the question
– Maria
But how do you expect your table to look? It is correctly represented by what you have put, there are several lines (
tr
) and in each row there is a header (th
). With this, it will stay the way it is represented in the snippet.– Gustavo Cinque
I expect it to be in the middle of the screen. It is a vertical table, and receives TD data from an API. Only it is not centered in the middle of the screen
– Maria
But it’s centered... at least it’s like what the snippet is.
– Gustavo Cinque
But when I see Chrome, he’s not in the center, he ends up getting a little on the left side
– Maria
It may be that she doesn’t get centered because of the td that comes after and then doesn’t appear
– Maria
@Nazarelisboa see if my answer helps you
– Caique Romero