I just read up on the CSS function calc()
in Mozilla's Developer Network.
The first example in this article uses the following CSS code:
.banner {
position: absolute;
left: calc(40px);
width: calc(100% - 80px);
border: solid black 1px;
box-shadow: 1px 2px;
background-color: yellow;
padding: 6px;
text-align: center;
box-sizing: border-box;
}
And this HTML markup:
<div class="banner">This is a banner!</div>
Pardon me, if this is an overly trivial question, but is there any reason to use left: calc(40px)
or is that simply a mistake? Since there is nothing to compute, I'd just put left: 40px;
.