ohho
ohho

Reputation: 51951

How to fit a fixed-width table to the full width of a phone browser?

In an old web app, the layout was mostly done by fixed-width tables:

<div class="main">
    <table width="520" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td>...</td>
        </tr>
        <tr>
            <td>...</td>
        </tr>
        <tr>
            <td>...</td>
        </tr>
    </table>
</div>

Is there a way to fit the above fixed-width (520px) table to the width of a mobile phone browser window, when the page is first loaded?

Upvotes: 0

Views: 61

Answers (1)

yangli-io
yangli-io

Reputation: 17354

Add this tag in your header and it should work

<meta name="viewport" content="width=device-width, user-scalable=no" />

Upvotes: 1

Related Questions