Logan
Logan

Reputation: 121

Table getting out of div

I have div in my View

Here is code

<div style="width: 100%; text-align: center; margin-top: 10px;">
    <table class="table" style="table-layout: fixed;">
        <tr style="background: white">
            <th></th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                Invoice
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                Status
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                First -Last Name
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                Invoice printed
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                Invoice paid
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                Payment reminder printed
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                1st overdue notice printed
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                2nd overdue notice printed
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                Open invoice with VAT€
            </th>
            <th style="font-size: 20px; text-align: center;color:#1d69b4;">
                Select all
            </th>

            <th></th>
        </tr>

    </table>
</div>

On 1920*1080 all ok, but on 1366*768 some columns outta div.

Like this

enter image description here

I try to use style="table-layout: fixed;"

But it's look like this

enter image description here

How I can make my table to look right?

Upvotes: 1

Views: 53

Answers (1)

Ranga RS
Ranga RS

Reputation: 142

Try using max-width for the table and set the value to anything less than 100%, remove table-layout style.

Upvotes: 1

Related Questions