adjusting margins for gallery