Perform calculations to determine CSS property values

CSSWeb DevelopmentFront End Technology

Get the values of properties in CSS using the calc() property. You can try to run the following code to implement the calc() function in CSS


Live Demo

<!DOCTYPE html>
         #demo {
            position: absolute;
            width: calc(100% - 100px);
            background-color: blue;
            text-align: center;
      <h1>Heading One</h1>
      <div id = "demo">This is it!</div>
Published on 31-May-2018 10:59:35