To reproduce: Put a gallery slideshow inside a <div> with max-width set to a value less than approx 270px (and images larger than this in the gallery).
Actual results: The "right arrow" control wraps onto the next line.
Expected results: The gallery controls should have a responsive layout, reducing the spacing between themselves as the available width reduces.
One way to do this would be to specify the ul.gallery.mw-gallery-slideshow .mw-gallery-slideshow-buttons .oo-ui-buttonElement left/right margins in percentage terms (e.g. 5%) rather than a fixed 2em value.
Reported on enwiki's Wikipedia talk:WikiProject portals.