Skip to content

Instantly share code, notes, and snippets.

@matthewcrist
Created February 19, 2012 13:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matthewcrist/1863776 to your computer and use it in GitHub Desktop.
Save matthewcrist/1863776 to your computer and use it in GitHub Desktop.
Box Sizing
* {
-webkit-box-sizing: border-box; /* Safari < 5.1, Chrome < 10 */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+/Safari5.1+/Chrome 10+ */
}
@MarcusJT
Copy link

Handy! However, you might want to update the comments to more accurately reflect the latest browser support info from https://developer.mozilla.org/En/CSS/Box-sizing#Browser_compatibility - i.e. that Chrome (since v10) and Safari (since v5.1) no longer require a vendor prefix...?

@matthewcrist
Copy link
Author

Updated. Thanks Marcus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment