Set max and min limits for width and height inputs