Viewport and tables

Viewport and tables
0.0 0

#1

HI All,
I put a meta viewport tag on a clients site, and set the initial scale to .43 as this is what I could come up with tot get it to scale correctly on a phone.
However the scaling on the landscape view is not the prettiest, I didnt expect it to be because the site is built into a table, and even on desktop view the margins are quite wide but I’m just curious if there is a better way to do this in which the rotation to landscape on a mobile device scales a little better?


#2

Without seeing your code, avoid tables with fixed widths, avoid fixed widths, use percentages, or use min-width/max-width to control your layout.

Usually, one just do a

<meta name="viewport" content="width=device-width, initial-scale=1">

and this should work just fine on landscape or portrait on a mobile device. Just use @media queries for tighter control of your layout depending on the device screen width.