DEV Community

Grant Smith
Grant Smith

Posted on

Should desktop sites have a max-width?

I'm looking for opinions on the above. Personally, I when view sites on my 27" monitor that are full width, they tend to look less than ideal. Whereas, my laptop seems to really suit the format. However, having a load of white/grey on either side may be received negatively?

So for my first post, I thought I would see if the community has opinions on the subject?

Top comments (6)

Collapse
 
pavelloz profile image
Paweł Kowalski

Well, max-width can be set in vw unit, which means, it can have the same percentage on both sides.

Having said that, i think it should be determined on use case basis, because content should probably decide how layout should look like.

If you make 2540px with 14px font 100% width, then, reading that long line is... not optimal.
If you do a group of charts full width, it might be better.

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

I think it depends on the site, and how it's implemented. GitHub, for example, does a good job IMO, and so does DEV. The 'main' content on both for most of the pages is a reasonable percentage of the screen, and the secondary content is offset sanely and has it's own capped width, so you end up with things focused in a way most people actually think.

Collapse
 
jonlehman profile image
Jon Lehman

I share similar opinions as others have previously commented. It does depend on the purpose and content of the site but in general as a user (ultra-wide display is my primary) I find the centered content ideal and I don't mind the whitespace on the sides. Though, like others mentioned secondary bits of information that are placed outside of the centered container or visual elements that bleed the full width of the screen are also nice.

I would definitely consider a centered container if your primary content consists of bodies of text. Readability guidelines for optimal line length go way back to the earlier days of printing. General rules of thumb suggest a line length of between 50-75 characters. Reading a long article that spans the entire width of a wide monitor is exhausting IMHO, and I tend to lose my place when my eyes follow the text wrapping.

Collapse
 
ryancmcconnell profile image
Ryan McConnell

I think both can be good. I usually like to have full width navigation and headers and then fixed-width content areas. Testing on a wide variety of resolutions is really helpful.

Collapse
 
elmuerte profile image
Michiel Hendriks

Yes. I have my browser at about 75% width of my display on all my desktops.

Collapse
 
joel profile image
Joel Krause

If the site is designed according full width can be quite nice. But most of the sites I build I have a max-width plus I have my browser window set to about 1920 wide ☺️