Josh Josh - 2 months ago 50
CSS Question

css calc invalid property value

Can someone tell me why this CSS calc function isn't working? When I inspect element on Chrome, it says 'Invalid property value'.

width: calc((100vw - 14px * 2) / (270px + 11px * 2));

Answer

You can't divide by units like px, only numbers.