Fix calculation of float height and width.

We were overshooting on height by including margins, and undershooting on
width by not including margins, borders, and padding.