Fix margin rounding issue on mobile devices

- Fractional values are rounded down on mobile browsers, but not desktop browsers.