Trying to minimize table height (TABLE, TBODY and offset)

I am trying to minimize the height of the table shown below. the arsonist says that the height of the table is 29, v. 25, and both lines together.

The layout tab does not show that there are any additions, margins or borders. Although, this tells me that tbody has 2 pixel offsets, and the same goes for tr. Is there a way to prevent this bias?

<body>
    <table style="width: 100%">
        <tr>
            <td>foo
            </td>
            <td>bar
            </td>
        </tr>
        <tr>
            <td colspan=2></td>
        </tr>
    </table>
</body>

Related question: Why do browsers insert a tbody element into table elements?

+3
source share
2 answers

If I understand your question correctly, it looks like you want to do this on all of your table elements:

padding:0px
border-collapse:collapse;

http://www.w3schools.com/Css/pr_tab_border-collapse.asp

, reset.css, .

+5

Source: https://habr.com/ru/post/1717853/


All Articles