width and height stay inside user-specified size bounds