• Resolved nesoor

    (@nesoor)


    Hello,
    When I insert a Gallery with Elementor all my photos have a grey border.
    This border is inline css inserted by wp-includes/media.php.

    Why is the file media.php inserting inline code ? How can I disable this ?
    It’s a core file from WordPress itself.

    You can find the file in: wp-includes/media.php
    The code start on line: 1740

    if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {
    		$gallery_style = "
    		<style type='text/css'>
    			#{$selector} {
    				margin: auto;
    			}
    			#{$selector} .gallery-item {
    				float: {$float};
    				margin-top: 10px;
    				text-align: center;
    				width: {$itemwidth}%;
    			}
    			#{$selector} img {
    				border: 2px solid #cfcfcf;
    			}
    			#{$selector} .gallery-caption {
    				margin-left: 0;
    			}
    			/* see gallery_shortcode() in wp-includes/media.php */
    		</style>\n\t\t";
    	}
    
    • This topic was modified 6 years, 11 months ago by nesoor.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Gallery border inline css media.php’ is closed to new replies.