How to set a global max width?

As title.

The default global width will always take full width where should I set the max-width ?

You can easily wrap everything in the container (just after the body)


#mainContainer {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;


<body ng-app="joinsam">
	<div id="mainContainer">
1 Like

@lokers add overflow: hidden too