Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do websites often have spacing on either side of the content?

Tags:

html

web

I have observed that many sites have left some spaces on both sides of the page. What is the reason behind it? Is it a part of web design standards?

like image 812
felix Avatar asked Nov 27 '22 18:11

felix


1 Answers

You typically want your content to display reasonably on all reasonable sized monitors without requiring horizontal scrolling. One way of doing this is to make sure your content goes no wider than a certain number of pixels (say 760 ish for 800x600 monitors or 960ish if you want to target 1024x768 as your minimum monitor size).

The other option is "liquid" layouts that stretch to the browser window's size, but these are typically harder to code and are often equally undesirable for very large monitors (do people really want a website to be stretched across a 1900x1200 resolution?).

like image 81
Matt Mitchell Avatar answered Dec 05 '22 17:12

Matt Mitchell