# Learn CSS Flexbox by Building a Photo Gallery - Step 11

**URL:** <https://forum.freecodecamp.org/t/learn-css-flexbox-by-building-a-photo-gallery-step-11/645762>\
**Category:** Curriculum Help\
**Created:** [October 21, 2023, 2:43am UTC](https://forum.freecodecamp.org/t/learn-css-flexbox-by-building-a-photo-gallery-step-11/645762 "2023-10-21T02:43:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![surelyalice](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/surelyalice/32/338407_2.png) [@surelyalice](https://forum.freecodecamp.org/u/surelyalice)\
**Post date:** [October 21, 2023, 2:43am UTC](https://forum.freecodecamp.org/t/learn-css-flexbox-by-building-a-photo-gallery-step-11/645762/1 "2023-10-21T02:43:44Z")

</div>

**Tell us what’s happening:**  
I am having a issue with the code thus far, I have done it .gallery, img  
Should i do them separately. I think the issue has to do with my layout. I am not sure if i need to do them as separate, or if I am missing an element.

**Your code so far**

```html
<!-- 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">
      <h1>css flexbox photo gallery</h1>
    </header>
    <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">
    </div>
  </body>
</html>

```

```css
/* file: styles.css */
* {
  box-sizing: border-box;
}

/* User Editable Region */

.gallery img{width: 100% 350px; height: 300px;}

/* 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/118.0.0.0 Safari/537.36`

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

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-css-flexbox-by-building-a-photo-gallery/step-11)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![anon42932716](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@anon42932716](https://forum.freecodecamp.org/u/anon42932716)\
**Post date:** [October 21, 2023, 2:55am UTC](https://forum.freecodecamp.org/t/learn-css-flexbox-by-building-a-photo-gallery-step-11/645762/2 "2023-10-21T02:55:11Z")

</div>

Hello @surelyalice !

Great attempt!

Example Only:

```auto
width property: 800px;
max w property: 850px;
}

```

The max-width: 350 px; needs to be separate from the width in th code.

`To let you know, I had the same problem at first, and even now sometimes. `

Keep up the great progress!

---

<div class="post-metadata">

**Author:** ![surelyalice](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/surelyalice/32/338407_2.png) [@surelyalice](https://forum.freecodecamp.org/u/surelyalice)\
**Post date:** [October 21, 2023, 3:03am UTC](https://forum.freecodecamp.org/t/learn-css-flexbox-by-building-a-photo-gallery-step-11/645762/3 "2023-10-21T03:03:05Z")

</div>

## You're like a coding
 
# Super Hero

### thank you so much!

---

<div class="post-metadata">

**Author:** ![anon42932716](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@anon42932716](https://forum.freecodecamp.org/u/anon42932716)\
**Post date:** [October 21, 2023, 6:36am UTC](https://forum.freecodecamp.org/t/learn-css-flexbox-by-building-a-photo-gallery-step-11/645762/4 "2023-10-21T06:36:08Z")

</div>

Thank you for your kind words, @surelyalice! Happy to help!

Keep up the great progress you are making with your coding journey!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [April 20, 2024, 6:36pm UTC](https://forum.freecodecamp.org/t/learn-css-flexbox-by-building-a-photo-gallery-step-11/645762/5 "2024-04-20T18:36:58Z")

</div>

Closed on April 20, 2024, 6:36pm UTC

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