Row height problem in an HTML table

Asked

Viewed 7,308 times

1

I used the following code to show some data in a table:

<table>
    <thead>
        <tr  heigth="2px">
            <th  align="left" width="180">Nr DBC</th>
            <th align="left" width="380px">Descrição DCB</th>
            <th align="left" width="400px">Medicamento / Apresentação</th>
            <th align="left" width="80">Estoque &#013 Inicial</th>
            <th align="left" width="80">Entrada&#013 (Aquisição)</th>
            <th align="left" width="80">Saida &#013(Receitas)</th>
            <th align="left" width="80">Perda</th>
            <th align="left" width="80">Estoque &#013 Final</th>
        </tr>
    </thead>
    <tbody>
        <tr heigth="5px" ng-repeat="item in lstMov" class="small">
            <td height="5px"><h6>{{ item.dcb_substancia }}</h6></></td>
            <td height="5px"><h6>{{ item.nome_substancia }}</h6></td>
            <td height="5px"><h6>{{ item.nome_medicamento }}</h6></td>
            <td height="5px" align="center"><h6>{{ item.estoque_anterior }}</h6></td>
            <td height="5px" align="center"><h6>{{ item.qtde_entrada }}</h6></td>
            <td height="5px" align="center"><h6>{{ item.qtde_saida }}</h6></td>
            <td height="5px" align="center"><h6>{{ item.qtde_perda }}</h6></td>
            <td height="5px" align="center"><h6>{{ item.estoque }}</h6></td>
    </tbody>
</table>

The result is displayed in the image:

inserir a descrição da imagem aqui

I need to decrease the line height, as you can see in the image, it’s very high, in the td and tr, assigning heigth="5px", but it had no effect.

How can I change line height? I’m using this template

  • 1

    I don’t know if this answer is still useful to you, but in the <tr> line 3 tag declaration and on line 15, there is a spelling error in the height parameter. You wrote heigth.

1 answer

3


A minimum, complete and verifiable example would be needed. But you can even understand the H1~H6 tag has this even spaced formatting.

<table border="2">
                        <thead>
                            <tr>
                                <th  align="left" width="180">Nr DBC</th>
                                <th align="left" width="380px">Descrição DCB</th>
                                <th align="left" width="400px">Medicamento / Apresentação</th>
                                <th align="left" width="80">Estoque &#013 Inicial</th>
                                <th align="left" width="80">Entrada&#013 (Aquisição)</th>
                                <th align="left" width="80">Saida &#013(Receitas)</th>
                                <th align="left" width="80">Perda</th>
                                <th align="left" width="80">Estoque &#013 Final</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="item in lstMov" class="small">
                                <td>{{ item.dcb_substancia }}</></td>
                                <td>{{ item.nome_substancia }}</td>
                                <td>{{ item.nome_medicamento }}</td>
                                <td align="center">{{ item.estoque_anterior }}</td>
                                <td align="center">{{ item.qtde_entrada }}</td>
                                <td align="center">{{ item.qtde_saida }}</td>
                                <td align="center">{{ item.qtde_perda }}</td>
                                <td align="center">{{ item.estoque }}</td>
                        </tbody>
                    </table>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.