Flex-box Direction
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="hello.css">
</head>
<body>
<h1>Flexbox Playground</h1>
<div id="container">
<div style="background-color:#9400d3">voilet</div>
<div style="background-color:#4b0082">indigo</div>
<div style="background-color:#0000ff">blue</div>
<div style="background-color:#00ff00">green</div>
<div style="background-color:#ffff00">yello</div>
<div style="background-color:#ff7f00">orange</div>
<div style="background-color:#ff0000">red</div>
</div>
</body>
</html>
CSS
#container {
height: 300px;
width: 80%;
background-color:rgb(204, 247, 247);
margin: 10px auto;
border: 2px solid rgb(0, 0, 0);
display: flex;
flex-direction: column;
}
h1{
text-align: center;
}
#container div{
height: 100px;
width: 300px;
color: white;
text-align: center;
font-size: 1.5em;
}

Comments
Post a Comment