Move non-file gallery thumbnails to the top of the primary content area and clear elements under them.