height width ratio check and made painting page pretty