Created
June 19, 2012 20:32
-
-
Save shunchu/2956372 to your computer and use it in GitHub Desktop.
Define "100% - 50px" in css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Have padding and border that cut into the element's width instead expanding it. */ | |
textarea { | |
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ | |
-moz-box-sizing: border-box; /* Firefox, other Gecko */ | |
box-sizing: border-box; /* Opera/IE 8+ */ | |
} | |
/* reference: http://css-tricks.com/box-sizing/ */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment