Gorg Gorg - 5 months ago 30
CSS Question

How to add webkit support to calc?

I can see that calc is more compatible when using webkit. Usually when you add support for webkit or moz you do something like:

-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;

What is the correct syntax for calc?

width: -webkit-calc(100% - 100px);


correct syntax for calc is

/* Firefox */
width: -moz-calc(100% - 100px);
/* WebKit */
width: -webkit-calc(100% - 100px);
/* Opera */
width: -o-calc(100% - 100px);
/* Standard */
width: calc(100% - 100px)