CSS FLEX BOX
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=, initial-scale=1.0">
<title>CSS LEVEL 4</title>
<link rel="stylesheet" href="STLE.CSS">
</head>
<body>
<h1>FLEXBOX PLAYGROUND</h1>
<div id="container" >
<div id="box1">box1</div>
<div id="box2">box2</div>
<div id="box3">box3</div>
<div id="box4">box4</div>
<div id="box5">box5</div>
</div>
</body>
</html>
CSS
body{
text-align: center;
}
div{
height: 50px;
width: 150px;
display: inline-block;
border: 2px solid black;
background-color: gold;
display: flex;
flex-direction: row;
justify-content: space-around;
}
#container{
width: 600px;
height: 600px;
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
align-items: center;
align-content: center;
}
#box1{
background-color: aqua;
}
#box2{
background-color: pink;
height:200px ;
}
#box3{
background-color: red;
height: 75px;
}
#box4{
background-color: green;
}
#box5{
background-color:violet;
}
OUTPUT
(SOME ARE NOT COPYABLE)
box2
box3
box4
Comments
Post a Comment