FLEX-BOX
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 id="one" 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 style="background-color:#43f0ed">sky</div>
<div style="background-color:#ff00e6">pink</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;
justify-content: flex-start;
/* flex-wrap: wrap-reverse; */
align-items: center;
align-content:space-evenly;
flex-wrap: wrap;
align-items: center;
box-shadow: 2px 2px 8px black;
}
h1{
text-align: center;
}
#container div{
height: 100px;
width: 200px;
color: white;
text-align: center;
font-size: 1.5em;
box-shadow: 2px 2px 8px black;
}
#one{
flex-basis: 500px;
flex-grow: 4;
/* height: 300px;
width: 200px;
}

Comments
Post a Comment