Tutorials

Table of contents
Close

Max-width

Using max-width instead of width in this situation will improve the browser's handling of small windows. This is important when making a site usable on mobile. Resize this page to check it out!

By the way, max-width is supported by all major browsers including IE7+ so you shouldn't be afraid of using it.

body{
max-width: 1080px;
margin: 0 auto;
}