logoalt Hacker News

dofm • yesterday at 12:27 PM • 3 replies • view on HN

The screenshot does not scale to fit, so you get a horizontal scroll.

It's not the end of the world.

But as it goes, not everyone has the motor control to _only_ scroll a phone view vertically; unexpected horizontal scroll can be frustrating, especially when one very wide element leaves the screen otherwise confusingly blank elsewhere on the page.

(I've actually witnessed this frustration from an older user in real life)


Replies

bagatelle • yesterday at 6:08 PM

Author here, I don't personally use my phone to access websites often, so I forget to check on things like this. My bad! I'll take a look into it when I get a chance.

strenholme • yesterday at 12:41 PM

Having horizontal scroll is annoying, yes, but I don’t think it makes a website unusable on a mobile device.

The way to handle elements wide enough to induce horizontal scrolling is to put them in a <div> (or make CSS for the tag in question) and make CSS with overflow-x: scroll; for just that element. An example from one of my webpages:

  pre {max-width: 90vw; overflow-x: scroll;}
➕ show 1 reply
SoftTalker • yesterday at 3:40 PM

If I have to zoom on mobile, I go straight to Reader mode. If that doesn't work, I close the page.