3 ms·
Making a one-column text-only website work on mobile is trivial with a meta tag and a few lines of CSS.
by raquo 11y ago
Making a one-column text-only website work on mobile is trivial with a meta tag and a few lines of CSS.
- deleted 11y ago[deleted]
- DanBC 11y agoThere are two columns: one for the text and one for the vote buttons. Does that affect your version? (What are those few lines of CSS btw?)
- raquo 11y agoOn such a simple site it's enough to set max-width on the whole body and maybe adjust a few elements such as the comment input box. These max-widths etc. can be different based on available screen width: https://css-tricks.com/css-media-queries/ https://css-tricks.com/css-media-queries/ The meta tag can be used to set viewport width to device screen width. Without it, the mobile browser doesn't know what minimum screen width the webpage requires, so it assumes 800px (or 1024px), because rendering a random website with viewport width of 240px is not a good idea even in 2015. My point is, browsers should be doing what the website code tells them to do. Websites that display nicely on desktop computers usually display fairly nicely on mobile as well. But HN shows 20-30 words per line on desktop, which is... suboptimal for readability, so it's only expected that mobile browsers produce similar results.