Learn CSS Flexbox by Building a Photo Gallery - Step 5

Tell us what’s happening:
Hello everybody, I am doing the step 5 of css flexbox photo gallery challenge where I am supossed to create a div with the name of gallery and put 9 image elements inside.

I thought it would be simple, as you can see on my code there is the div and the 9 img elements inside, but I still get the messagem " Your .gallery element should have nine img elements." and I really don understand whats wrong, can you help me?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Photo Gallery</title>
    <link rel="stylesheet" href="./styles.css">
  </head>
  <body>
    <header class="header">
      <div class="gallery">
      <h1>css flexbox photo gallery</h1>
    </header>
     <div class="gallery">
        <img>
        <img>
        <img>
        <img>
        <img>
        <img>
        <img>
        <img>
        <img>
    </div>
  </body>
</html>
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 OPR/92.0.0.0

Challenge: Learn CSS Flexbox by Building a Photo Gallery - Step 5

Link to the challenge:

You were only supposed to add 9 img elements.
Instead you added a div and nine img elements.

Thank you! I didnt notice that I had another Div element above my H1 element, that was the problem!

1 Like

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