Learn CSS Flexbox by Building a Photo Gallery - Step 7

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <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">
    <header class="header">
      <h1>css flexbox photo gallery</h1>
    <div class="gallery">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/1.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/2.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/3.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/4.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/5.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/6.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/7.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/8.jpg">
      <img src="https://cdn.freecodecamp.org/curriculum/css-photo-gallery/9.jpg">
/* file: styles.css */

/* User Editable Region */

  .gallery {
    width: 50%;
    border: 5px solid red;
    .img {
      width: 100%;
      padding: 5px;
      border: 5px solid blue;

/* User Editable Region */

Your browser information:

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

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

Link to the challenge:

whats wrong with my code?

What does the error message say? What did you try to fix the error message? Where did you get stuck?

1 Like

it says
You should have an img selector.

1 Like

Okay and the other two questions?

Currently you have a .img selector, which isn’t an img selector

im trying to fix the issue with the img selector, the hint says
You should have an img selector
but i dont know how to type it correctly so the code can pass

maybe the code is good, just needs a img selector.

Did you see this part of my reply?

thank you sir hahahahahahahahahahahahahhahaha

1 Like

yes but it took a min to click
had to delete period
whyyyyyyyy??? omg ive been stuck for an hour

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