Skip to content

Instantly share code, notes, and snippets.

@llkats
Created June 20, 2012 00:21
Show Gist options
  • Save llkats/2957296 to your computer and use it in GitHub Desktop.
Save llkats/2957296 to your computer and use it in GitHub Desktop.
force borders/padding to be calculated as part of 100% width
nav {
border: 4px solid #333;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
padding: 0 8px;
width: 100%
}
/*
see https://developer.mozilla.org/En/CSS/Box-sizing and http://css-tricks.com/box-sizing/
/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment