css3 – How to round table edges (border-radius)

Question:

    <table class="table_block">
        <thead>
            <tr>
                <td>ID</td>
                <td>Название</td>
                <td>Цена</td>
                <td>Цвета</td>
                <td>Продажи</td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>Name</td>
                <td>50$</td>
                <td>Black, White</td>
                <td>104</td>
            </tr>
            <tr>
                <td>2</td>
                <td>Name</td>
                <td>70$</td>
                <td>Red, Blue, Grey</td>
                <td>255</td>
            </tr>
        </tbody>
    </table>

You need to round off the edges of the entire table. I didn’t try to, which I didn’t apply to … I tried to round off the first td, I tried with tr. The whole table, of course, does not apply. In general, nothing is wrong. Help me please

Answer:

And in fact for cross-browser like this :):

.table_block {
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -khtml-border-radius: 10px;
  border: 1px solid #000;
  display: block;
}​

Although my answer is probably out of date.

Scroll to Top