this post was submitted on 22 Jun 2023
495 points (98.4% liked)
Memes
45546 readers
1733 users here now
Rules:
- Be civil and nice.
- Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
TL;DR: big elements cause annoying scroll-bars to appear.
My username is very big, so when I open this page on a mobile I get a horizontal scroll-bar for the entire page.
In CSS there's a property called
overflow
which lets you decide how you want elements that contain elements wider or taller than them to behave. So you can solve this problem by simply making that element itself scroll instead of the entire page by usingoverflow: scroll
, or hide the child elements by usingoverflow: hidden;
.You can also solve these problems by dealing with the child elements for example: using the
word-wrap
property to allow word wrapping, using thehyphens
property to break words with hyphens, or in this case use the HTMLwbr
tag to allow line breaking after every underscore, or even cut the longer words and append three dots to them; so my user name would look like this: "Limitless_s...".I havent seen any such thing on mobile browser here. Its taken screen space into account quite well.