added right and bottom margin support