The calc() CSS function is often used for calculating relative values. In the example below, what is the specified margin-left value?

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

.example {
margin-left: calc(5% + 5px);
}

  • The left margin value is equal to 5% of its parents element’s width plus 5px
  • The left margin value is equal to 5% of the viewport width plus 5px
  • The left margin value is equal to 5% of the closest positioned element’s width plus 5px
  • The left margin value is equal to 5% of the selected element’s width (.example) plus 5px
0/5 (0 Reviews)

Like this article?

Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Related Posts