Align Div Side By Side Html Responsive Code Example


Example 1: how to align two divs side by side

.wrapper {     display: flex;     flex-wrap: wrap; }  .wrapper>div {     flex: 1 1 150px;     height: 500px; }

Example 2: div side by side

.float-container {     border: 3px solid #fff;     padding: 20px; }  .float-child {     width: 50%;     float: left;     padding: 20px;     border: 2px solid red; } <div class="float-container">    <div class="float-child">     <div class="green">Float Column 1</div>   </div>      <div class="float-child">     <div class="blue">Float Column 2</div>   </div>    </div>

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable