Modified the gallery style to apply to multiple pages.