Is it possible to get a negative value with CSS calc()?

A simpler trick than previous ones: calc(0px - something) – with an unit – works while calc(0 - something) doesn’t. See Fiddle 3

These “tricks” work:

calc(1px - something - 1px);
calc(-1 * something)
calc(0px - something) /* new */

where 0 - something didn’t (at least with your example).

Fiddle 1
Fiddle 2

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)