Why do containers on some websites get too small when emulating small screens in dev tools?

On www.gov.uk to take 1 example, the containers which normally span the whole width of the screen end up getting too small at low screen widths. Interestingly they behave differently in Chromium and Firefox.

https://www.youtube.com/watch?v=WpRij-sf8ZM

Any ideas as to what causes this? I've noticed it on my own sites as well and have failed to troubleshoot it so far.

Why do containers on some websites get too small when emulating small screens in dev tools?

4 comments · 75% upvoted · other discussions

comments

yuricomm

I generally see this behavior when the contents are too big for the container at the width you've shrunk it to. I think the cause is something like the container is some percent of the screen size, but the contents are fixed at a larger size, so the only option to view everything is to zoom out (Chromium behavior) or scroll (Firefox behavior). I'm not sure how an actual device with a screen that narrow would handle the situation, but if you expect anyone to be using a screen that small you should probably include styling to make the fonts actually fit the screen. That would probably be some css added that reduces all the larger font sizes up to whatever media breakpoint makes sense.

In this case, the text in larger fonts like the headers can't get any narrower. In the title there's a non-breaking space character between the last two words which explains why the last word doesn't wrap.

to7m [OP]

Looks like you're right! It seems to silently zoom out to a maximum of 25% in some cases. Maybe there's a variable in the source code of the browsers that could be set to 100% to disable this.

Chance-Cobbler216

Feeling aren't better than facts in movies, historical movies overall. Trying to show history as so much pink visioned ,liberate and accepting society where poc people were indulgent in the society destroys historical facts and whole basis of history because history isnt something peoplenlike its somethig that was a fact.Anne boleyn actress sint English by race she's English in other means . If anne boleyn wasn't black creating her black in movie makes no sense. Ethics have context and shouldnt be done in exchange of losing historical meaning and leaning from the "historical " genre. Portraying black people as queens would mean history was different wasnt racist ,was open minded and that's not the reality. Sensitive nature shouldnt win over cold hard given facts and foundations so ethical part of why jodie Turner Smith should make sense to portray anne boleyn is sorry irrelevant.

budd222

Some CSS somewhere. Websites don't do that on their own