adjust margin and padding in gallery