Advertisement
.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
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.