added margins, absolute layout, prevent box being larger than max size