Created
January 14, 2019 16:17
-
-
Save weirdpattern/a11ff7bd49f7e5b5a24d2a2cc48554d3 to your computer and use it in GitHub Desktop.
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
2019.01.14.calculating-values-in-css-with-calc |
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
<html> | |
<head> | |
<style> | |
.container { | |
width: calc(100% - 50px); | |
background-color: #CDEBC4; | |
color:#6D8B64; | |
text-align: center; | |
padding: 25px 0; | |
margin: 0 auto; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
This div has a width of 100% - 50px | |
</div> | |
</body> | |
</html> |
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
calc(<expression>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment