html - iframes escaping css columns in Chrome -


i trying set iframes inside grid 3 columns.


html

<div id="blogposts">      <div class="blogpost">         <iframe width="100%" src="https://www.youtube.com/embed/yqew9_5kuri" frameborder="0" allowfullscreen=""></iframe>         <div class="title">youtube video</div>         <div class="time">11th may, 2015</div>         <div class="info">this best youtube video ever!</div>     </div>      ... </div> 

css

#blogposts {     -moz-column-count: 3;     -moz-column-gap: 10px;     -webkit-column-count: 3;     -webkit-column-gap: 10px;     column-count: 3;     column-gap: 10px;     width: 100%; } .blogpost {     display: inline-block;     margin-bottom: 20px;     width: 100%; } 

what like:

enter image description here


what want like:

enter image description here


but problem is, iframe jumps out of grid. here my jsfiddle show happening. can see first 'box' works fine (as expected) next 2 boxes right, iframe escapes?

modified code adding position blogpost class.

#blogposts {      -moz-column-count: 3;      -moz-column-gap: 10px;      -webkit-column-count: 3;      -webkit-column-gap: 10px;      column-count: 3;      column-gap: 10px;    }  .blogpost {        display: inline-block;    margin-bottom: 20px;    width: 32.1%;    position: absolute;  }    .blogpost:nth-child(1){  left: 34.2%;  }  .blogpost:nth-child(2){  left: 67.1%;  }
<div id="blogposts">      <div class="blogpost">          <iframe width="100%" src="https://www.youtube.com/embed/yqew9_5kuri" frameborder="0" allowfullscreen=""></iframe>          <div class="title">youtube video</div>          <div class="time">11th may, 2015</div>          <div class="info">this best youtube video ever!</div>      </div>            <div class="blogpost">          <iframe width="100%" src="https://www.youtube.com/embed/yqew9_5kuri" frameborder="0" allowfullscreen=""></iframe>          <div class="title">youtube video</div>          <div class="time">11th may, 2015</div>          <div class="info">this best youtube video ever!</div>      </div>            <div class="blogpost">          <iframe width="100%" src="https://www.youtube.com/embed/yqew9_5kuri" frameborder="0" allowfullscreen=""></iframe>          <div class="title">youtube video</div>          <div class="time">11th may, 2015</div>          <div class="info">this best youtube video ever!</div>      </div>  </div>

will solve problem?


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -