Step 18 in Learn CSS Flexbox by Building a Photo Gallery

Hey all! I’m a bit stuck and hope one of you could assist.

Below are the instructions given but the editor is not accepting the code. I’ve reset and redone the step, closed the tab and retried, removed cookies from browser and attempted it again, but it still won’t pass the test. Any suggestions on what to do?

"Step 18

Your images need some space between them.

The gap CSS shorthand property sets the gaps, also knowns as gutters, between rows and columns. The gap property and its row-gap and column-gap sub-properties provide this functionality for flex, grid, and multi-column layout. You apply the property to the container element.

Give your .gallery flex container a gap property with 16px as the value."

Relevant part of the written code: (.css file)

.gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 10px; 
  gap: 16px; /* not accepted */
}

Hello there,

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').


For future posts, if you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.


To answer your query: Your code passes on my end.

Be sure to use an updated browser, and make sure you have no browser extensions enabled with access to freecodecamp.org

Hope this helps

Thank you for your time and assistance.

I appreciate the tips :slight_smile:

Wishing you a wonderful day further!

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