Check out example codes for "display two divs side by side flexbox". It will help you in understanding the concepts better.

Code Example 1

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px;
}

Code Example 2

.float-container {
    border: 3px solid #fff;
    padding: 20px;
}

.float-child {
    width: 50%;
    float: left;
    padding: 20px;
    border: 2px solid red;
}

Learn ReactJs, React Native from akashmittal.com