Added "auto-resize" or "fit-to-div" modes.