Gallery working with responsive layout