html - All videos move to left in Chrome when columns is used -
i using -webkit-column-width
create multiple columns of videos (videos on youtube used testing purpose). works under ie. can not work under chrome. jsfiddle.
.newspaper { -webkit-column-width: 300px; -moz-column-width: 300px; column-width: 300px; }
<div class="newspaper" align="center"> <div style=" display: inline-block; border: 5px solid red;"> <iframe style="border-radius: 5px; " src="https://www.youtube.com/embed/mxaf92mmcv4"></iframe> </div> <div style=" display: inline-block; border: 5px solid red;"> <iframe style="border-radius: 5px;" src="https://www.youtube.com/embed/7fdfgeg-9r8"></iframe> </div> <div style=" display: inline-block; border: 5px solid red;"> <iframe style="border-radius: 5px; " src="https://www.youtube.com/embed/98xw8b3yotm?list=rdtdddvaogidg"></iframe> </div> <div style=" display: inline-block; border: 5px solid red;"> <iframe style="border-radius: 5px;" src="https://www.youtube.com/embed/r67maakkh_u"></iframe> </div> </div>
when width of window increased, there multiple columns. position of red box right. videos move left , in 1 column.
seems chrome bug, fixed workaround: jsfiddle
.newspaper { -webkit-column-width: 300px; -moz-column-width: 300px; column-width: 300px; } .video { display: inline-block; border: 5px solid red; -webkit-transform: translatez(0); transform: translatez(0); } .iframe { border-radius: 5px; }
<div class="newspaper"> <div class="video"> <iframe class="iframe" src="https://www.youtube.com/embed/mxaf92mmcv4"></iframe> </div> <div class="video"> <iframe class="iframe" src="https://www.youtube.com/embed/7fdfgeg-9r8"></iframe> </div> <div class="video"> <iframe class="iframe" src="https://www.youtube.com/embed/98xw8b3yotm?list=rdtdddvaogidg"></iframe> </div> <div class="video"> <iframe class="iframe" src="https://www.youtube.com/embed/r67maakkh_u"></iframe> </div> </div>
p.s. please, don't use inline styles.
Comments
Post a Comment