calc css code example

Example 1: rel css

<link rel="stylesheet" type="text/css" href="style.css">

Example 2: css calc height

div {
	width: calc(100% - 100px);
}

Example 3: css calc

body {
  width: calc(100vw - 8px);
  height: calc(100vh - 8px);
}

Example 4: width css

/*Based on viewport*/
width: 100vh;
width: 100vw;

Example 5: calc() css

.banniere {
  position: absolute;
  left: 40px;
  width: calc(40px - 80px);
  border: solid black 1px;
  box-shadow: 1px 2px;
  background-color: yellow;
  padding: 6px;
  text-align: center;
  box-sizing: border-box;
}

Tags:

Css Example