.parent {
display: flex; /* Enables Flexbox */
height: 300px; /* Set a specific height for the parent div */
border: 1px solid #000;
}
.child {
background-color: lightblue;
flex: 1; /* Optional: Makes the child take up remaining space */
}
.parent {
display: flex; /* Enables Flexbox */
height: 300px; /* Set a specific height for the parent div */
border: 1px solid #000;
}
.child {
background-color: lightblue;
flex: 1; /* Optional: Makes the child take up remaining space */
}
.flex-container {
/* We first create a flex layout context */
display: flex;
/* Then we define the flow direction
and if we allow the items to wrap
* Remember this is the same as:
* flex-direction: row;
* flex-wrap: wrap;
*/
flex-flow: row wrap;
/* Then we define how is distributed the remaining space */
justify-content: space-around;
padding: 0;
margin: 0;
list-style: none;
Comments