Removing gaps between photos

i’m trying to arrange photos using flex or grid but I can’t remove the gaps between photos no matter what I do… any help?


  • bear
  • foxes
  • mountain-valley
  • explorer-girl
  • people
  • meditating-girl
  • calendar
  • honeybees
  • turtle
  • people running

and here’s CSS

.pics {
margin-top: 2.5rem;
.pics ul {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(1fr, 2fr));
place-items: center;
grid-auto-flow: column;
gap: 0.1rem;
list-style: none;
width: 90%;
ul img {
border-radius: 0.5rem;
padding: 0;
margin: 0;

Post your entire html and css code. Use </> button in the text editor for this purpose.
Paste your code in between two groups of backticks ```.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.