Google News
logo
CSS - Interview Questions
What is CSS calc() function?
The calc() function performs a calculation to be used as the property value.
 
Example: 
 
#div1 {
  position: absolute;
  left: 50px;
  width: calc(100% – 100px);
  border: 1px solid black;
  background-color: yellow;
  padding: 5px;
  text-align: center;
}
Advertisement