css - Inline-block element next row not coming properly -


<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">  <style>    .div1{      display: inline-block;      width: 49%;  	border:1px solid red;  	height:250px;  }    .div2{      display: inline-block;      width: 49%;  	  	border:1px solid red;  }      .div3{      display: inline-block;      width: 49%;  	border:1px solid red;  	vertical-align:top;  	  }      .div4{      display: inline-block;      width: 49%;  	border:1px solid red;  }  </style>
<html>  <head>          </head>  <body>                <div class="div1">    content1  </div><!--   --><div class="div2">    content2  </div><!--   --><div class="div3">    content3  </div><!--   --><div class="div4">    content4  </div>           <body>    </html>

there gap between column2 , column4 how remove gap. between column2 , column 4.i have attached image understand once want align div4 after div2 there blank space create between div2 , div4.

i want put div4 after div2 .i new design not able understand behaviour.

try :

* {      box-sizing: border-box;  }    .col1, .col2 {      width: 49%;      position: absolute;      display: inline-block;  }    .col2 {      margin-left: 49%;  }    .div1, .div2, .div3, .div4 {      width: 100%;      border:1px solid red;  }    .div1 {      height:250px;  }
<div class="col1">      <div class="div1">some content1</div>      <div class="div3">some content3</div>  </div>  <div class="col2">      <div class="div2">some content2</div>      <div class="div4">some content4</div>  </div>


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -