Moved the mainBox's resize handler to the left, as per @devMaleki's suggestion