flex how to make two divs side by side code example
Example 1: div side by side flex
.float-container {
border: 3px solid #fff;
padding: 20px;
}
.float-child {
width: 50%;
float: left;
padding: 20px;
border: 2px solid red;
}
Float Column 1
Float Column 2
Example 2: display two divs side by side flexbox
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
}