curriculum/challenges/english/blocks/workshop-flexbox-photo-gallery/6153908a366afb4d57185c8d.md
Flexbox has a main and cross axis. The main axis is defined by the flex-direction property, which has four possible values:
row (default): horizontal axis with flex items from left to rightrow-reverse: horizontal axis with flex items from right to leftcolumn: vertical axis with flex items from top to bottomcolumn-reverse: vertical axis with flex items from bottom to topNote: The axes and directions will be different depending on the text direction. The values shown are for a left-to-right text direction.
Try the different values to see how they affect the layout.
When you are done, set an explicit flex-direction of row on the .gallery element.
Your .gallery selector should have a flex-direction property set to row as the value.
assert.equal(new __helpers.CSSHelp(document).getStyle('.gallery')?.flexDirection, 'row');
<!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;
}
.gallery {
display: flex;
--fcc-editable-region--
--fcc-editable-region--
}
.gallery img {
width: 100%;
max-width: 350px;
height: 300px;
}