How to set a global max width?


#1

As title.

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


#2

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

css:

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

html:

<body ng-app="joinsam">
	<div id="mainContainer">
		<ion-nav-view></ion-nav-view>
	</div>
</body>

#3

@lokers add overflow: hidden too