this post was submitted on 22 Jun 2023
474 points (98.4% liked)

Memes

45545 readers
1385 users here now

Rules:

  1. Be civil and nice.
  2. 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
[โ€“] Limitless_screaming@kbin.social 2 points 1 year ago* (last edited 1 year ago) (1 children)

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 using overflow: scroll, or hide the child elements by using overflow: 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 the hyphens property to break words with hyphens, or in this case use the HTML wbr 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...".

[โ€“] blazera@kbin.social 1 points 1 year ago

I havent seen any such thing on mobile browser here. Its taken screen space into account quite well.