Fixed responsive layout issue for FF in gallery.