Back to Freecodecamp

Step 11

curriculum/challenges/english/blocks/learn-css-flexbox-by-building-a-photo-gallery/615380dff67172357fcf0425.md

latest2.2 KB
Original Source

--description--

Now your images are too big.

Create a .gallery img selector to target them. Give them all a width of 100% and a max-width of 350px.

Also set the height property to 300px to keep your images a uniform size.

--hints--

You should have a .gallery img selector.

js
assert.exists(new __helpers.CSSHelp(document).getStyle('.gallery img'));

Your .gallery img selector should have a width property set to 100% as the value.

js
assert(new __helpers.CSSHelp(document).getStyle('.gallery img')?.width === '100%');

Your .gallery img selector should have a max-width property set to 350px as the value.

js
assert.equal(new __helpers.CSSHelp(document).getStyle('.gallery img')?.maxWidth, '350px');

Your .gallery img selector should have a height property set to 300px as the value.

js
assert.equal(new __helpers.CSSHelp(document).getStyle('.gallery img')?.height, '300px');

--seed--

--seed-contents--

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">
      
      
      
      
      
      
      
      
      
    </div>
  </body>
</html>
css
* {
  box-sizing: border-box;
}

--fcc-editable-region--

--fcc-editable-region--