


Very new to css and html, and am following along a udemy course and though I've followed along the instructor's code to a tee, my flex-wrap just isn't wrapping inside the container. Here's what I have so far:
body {
font-family: 'Open Sans', sans-serif;
}
h1 {
text-align: center;
}
#container {
background-color: #003049;
width: 90%;
height: 500px;
margin: 0 auto;
border: 5px solid #003049;
display: flex;
flex-direction: row;
justify-content: flex-start;
flex-wrap: wrap;
}
#container div {
width: 600px;
height: 200px;
text-align: center;
}
<h1>Let's Play With Flexbox</h1>
<section id="container">
<div style="background-color: #80ffdb"></div>
<div style="background-color: #64dfdf"></div>
<div style="background-color: #48bfe3"></div>
<div style="background-color: #5390d9"></div>
<div style="background-color: #6930c3"></div>
</section>
when i set it to flex-wrap: nowrap; it seems to be fine and stays within #container. But when I change it to flex-wrap: wrap; or flex-wrap: wrap-reverse; the colored div boxes go outside #container. Any help?