Flex Wrap
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="flexWrap.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flex Wrap</title>
</head>
<body>
<div id="outer">
<div id="violet">violet</div>
<div id="indigo">indigo</div>
<div id="blue">Blue</div>
<div id="green">Green</div>
<div id="yellow">Yellow</div>
<div id="orange">Orange</div>
<div id="red">Red</div>
</div>
</body>
</html>
CSS
#outer{
height: 500px;
width:800px;
border: 2px solid black;
margin: 3px;
display: flex;
flex-direction: row;
justify-content: flex-start;
flex-wrap: wrap;
justify-content: space-evenly;
}
#violet{
height: 100px;
width: 300px;
background-color: violet;
}
#indigo{
color: white;
height: 100px;
width: 300px;
background-color: indigo;
}
#blue{
color: wheat;
height: 100px;
width: 300px;
background-color: blue;
}
#green{
height: 100px;
width: 300px;
background-color: green;
}
#yellow{
height: 100px;
width: 300px;
background-color: yellow;
}
#orange{
height: 100px;
width: 300px;
background-color: orange;
}
#red{
height: 100px;
width: 300px;
background-color: red;


Comments
Post a Comment