Variant using CSS calc, apparently working fine in all desktop and mobile browsers