Check out example codes for "css 2 divs nebeneinander". It will help you in understanding the concepts better.

Code Example 1

#right{
                 background: green;     
                 width: 100%;
               }
               #left {
                 margin-top: 5px; /* to test if they intersect*/
                 background: red;
               }  
               #container {
                  width: 800px;
               }
               <div id="container">
                  <div id="left"> This div is as big as it's content</div>
                  <div id="right"> rest of space</div>
               </div>

Code Example 2

display: flex;
flex-direction: row;

Learn ReactJs, React Native from akashmittal.com