Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
2019.01.14.calculating-values-in-css-with-calc
<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>
calc(<expression>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.