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
- Your syntax highlighter is wrong
- Granddad died today
- The Three Ts of Time, Thought and Typing: measuring cost on the web
- I hate telephones
- The sorry state of OpenSSL usability
- The dots do matter: how to scam a Gmail user
- My parents are Flat-Earthers
- How Hacker News stays interesting
- Project C-43: the lost origins of asymmetric crypto
- The hacker hype cycle
- The inception bar: a new phishing method
- Time is running out to catch COVID-19
- A probabilistic pub quiz for nerds
- Smear phishing: a new Android vulnerability
Tagged . All content copyright James Fisher 2017. This post is not associated with my employer. Found an error? Edit this page.