Index: wp-includes/media.php =================================================================== --- wp-includes/media.php (revision 23338) +++ wp-includes/media.php (working copy) @@ -748,29 +748,43 @@ $itemwidth = $columns > 0 ? floor(100/$columns) : 100; $float = is_rtl() ? 'right' : 'left'; - $selector = "gallery-{$instance}"; + $selector = "gallery-{$id}-{$instance}"; $gallery_style = $gallery_div = ''; - if ( apply_filters( 'use_default_gallery_style', true ) ) + + if ( apply_filters( 'use_default_gallery_style', true ) ) { + $gallery_style = " + "; + + //check if this is the first instance and add general styles + if( 1 == $instance ) { + $general_gallery_style = " + - "; + "; + $gallery_style .= $general_gallery_style; + } + } + $size_class = sanitize_html_class( $size ); $gallery_div = "