curriculum/challenges/english/blocks/learn-css-flexbox-by-building-a-photo-gallery/61539e07e7430b528fbffe21.md
Give your .gallery selector a padding property set to 20px 10px to create some space around the container.
Then, give it a max-width of 1400px and add a margin of 0 auto to center it.
Your .gallery selector should have a padding property set to 20px 10px as the value.
assert.equal(new __helpers.CSSHelp(document).getStyle('.gallery')?.paddingTop, '20px');
assert.equal(new __helpers.CSSHelp(document).getStyle('.gallery')?.paddingBottom, '20px');
assert.equal(new __helpers.CSSHelp(document).getStyle('.gallery')?.paddingLeft, '10px');
assert.equal(new __helpers.CSSHelp(document).getStyle('.gallery')?.paddingRight, '10px');
Your .gallery selector should have a max-width property set to 1400px as the value.
assert(new __helpers.CSSHelp(document).getStyle('.gallery')?.maxWidth === '1400px');
Your .gallery element should be centered using a margin with 0 auto as the value.
assert.include(new __helpers.CSSHelp(document).getStyle('.gallery').cssText, 'margin: 0px auto');
<!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>
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: sans-serif;
background: #f5f6f7;
}
.header {
text-align: center;
text-transform: uppercase;
padding: 32px;
background-color: #0a0a23;
color: #fff;
border-bottom: 4px solid #fdb347;
}
--fcc-editable-region--
.gallery {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
--fcc-editable-region--
.gallery img {
width: 100%;
max-width: 350px;
height: 300px;
}