[ticket/12662] Fix rounding problems when detecting relative height

Firefox and IE round subpixels up, while webkit rounds down. So we have
to account for that.

PHPBB3-12662