Set responsive table size

Asked

Viewed 165 times

0

I’m creating a responsive table, only when I’m on a big screen, the table gets smaller than it should, I tried to add a max-width in the css of it, but it still doesn’t get the proposed size.

         <table bordered striped centered highlight responsive-table style="max-width: 500px;">
            <thead>
                <tr>
                    <th>Código</th>
                    <th>Descrição</th>
                    <th>Categoria</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>001</td>
                    <td>Notebook i7 8GB Branco</td>
                    <td>Informática</td>
                </tr>
                <tr>
                    <td>002</td>
                    <td>Caneta Esferográfica Azul</td>
                    <td>Papelaria</td>
                </tr>
            </tbody>
        </table>  

1 answer

1


The syntax is wrong. Said declare the class .

<table class="bordered striped centered highlight responsive-table" style="width: 90%; max-width: 500px;">

Browser other questions tagged

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