#galleryimg{ -ms-interpolation-mode:nearest-neighbor; /*IE 7-11*/ image-rendering: -o-crisp-edges; /*Opera 12*/ image-rendering: -webkit-crisp-edges; /*Safari 6-9*/ image-rendering:-moz-crisp-edges; /*Firefox 3.6-64*/ max-width: 718px; width: 100%; display: block; margin-left: auto; margin-right:auto; margin-top: -40px; margin-bottom: 1%; } #main-content{ background-color: #1E3B27; } #gallerycontainer{ background-color: #458D4C; width: 98%; display: flex; flex-direction: row; margin-left: auto; margin-right: auto; }