What is the
viewport meta tag? How can I display my website on mobile?
A key difference is the
viewport meta tag. On framer.com, this looks like:
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
The viewport tag controls how the browser displays the page. It can set multiple properties (such as
width property sets the size of a CSS pixel in physical pixels. A CSS pixel is a different concept to a physical pixel. A CSS pixel is an arbitrary unit, which is somehow resolved to a certain number of physical pixels (e.g., one CSS pixel = 2.5 physical pixels).
device-width, we access the physical resolution of the device, and set one CSS pixel to equal one device pixel.
After doing so on vidr.io, the experience is arguably worse. This is because the site was not designed for small-width screens. Let’s fix some of those problems next.
More by Jim
- Project C-43: the lost origins of asymmetric crypto
- How Hacker News stays interesting
- My parents are Flat-Earthers
- The dots do matter: how to scam a Gmail user
- The sorry state of OpenSSL usability
- I hate telephones
- The Three Ts of Time, Thought and Typing: measuring cost on the web
- Granddad died today
- Your syntax highlighter is wrong
I wrote this because I'm making the Vidrio website. It should display well on mobile. This post is not associated with my employer. Found an error? Edit this page.