Gazi Gazi - 1 month ago 6
HTML Question

Css3 transform hover effect is breaking below thumbs in chrome browser

Im having 2 days to find solution of this problem which happens only in chrome browser, in other browsers as Safari or Mozzilla everything is working fine

I added my work in jsfiddle here

If you put your mouse over the last thumb in chrome browser is breaking the below thumbs for one second.

My HTML:

<div class="listing-container clearfix">
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">3:59</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">798 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">3:59</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">798 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">3:59</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">798 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">3:59</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">798 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">3:59</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">798 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">3:59</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">798 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">3:59</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">798 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">15:00</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">569 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">4:28</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">612 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating"> 100%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#kelly-clarkson-breakaway/" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">3:55</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">615 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating"> 100%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="ico ico-hd"></span><span class="duration">4:00</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">563 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating"> 100%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>IThis is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">499 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<article class="video-item " id="bigThumb">
<div class="outline">
<a title="This is a Title" href="#" class="video-item-thumb">
<div class="wrapper"><img src="http://shushi168.com/data/out/114/36276270-image.png">
</div><span class="ico ico-play"></span><span class="duration">15:00</span><span class="site-wrap"><span class="site-info"><i class="btn-play"></i><span class="site-logo"></span></span>
</span>
</a><a title="This is a Title" href="#" class="video-item-title"><h2>This is a Title</h2></a>
<div class="video-item-footer">
<div class="video-stats clearfix">
<div class="stat">
<p class="stat-views">569 Views</p>
</div>
<div class="stat">
<p title="2 years ago" class="stat-when">2 years ago</p>
</div>
<div class="stat">
<p class="stat-rating">0%<span class="ico ico-thumbs-up"></span>
</p>
</div>
</div>
</div>
</div>
</article>
<div class="clearfix"></div>
</div>


and CSS:

.listing-container {
position: relative;
margin-left: -5px;
margin-right: -5px;
}

.listing-container.full-width {
margin-left: -4px;
margin-right: -4px;
}

.video-item {
position: relative;
float: left;
width: 238px;
margin-bottom: 10px;
padding: 0 5px;
}

.full-width .video-item {
width: 20%;
padding: 0 4px;
}

.video-item .outline {
position: relative;
border: 1px solid transparent;
overflow: hidden;
}
.video-item-thumb {
display: block;
position: relative;
height: 154px;
padding: 7px;
overflow: hidden;
}

.video-item-thumb span.ico,.video-item-thumb span.duration {
display: block;
position: absolute;
-webkit-transition: .3s opacity;
transition: .3s opacity;
}

.video-item-thumb .wrapper {
overflow: hidden;
max-width: 100%;
max-height: 100%;
}

.video-item-thumb:hover span.duration {
opacity: 0;
}

.video-item-thumb span.ico-play {
opacity: 0;
width: 38px;
height: 38px;
right: 18px;
bottom: 18px;
-webkit-border-radius: 38px;
-moz-border-radius: 38px;
-ms-border-radius: 38px;
border-radius: 38px;
text-align: center;
font-size: 15px;
line-height: 38px;
}

.video-item-thumb:hover span.ico-play {
opacity: 1;
}

.exclusive .video-item-thumb:hover span.ico-play {
opacity: 0 !important;
}

.video-item-thumb span.ico-hd {
left: 13px;
bottom: 13px;
font-size: 11px;
padding: 10px 6px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
border-radius: 3px;
}

.video-item-thumb span.duration {
right: 13px;
bottom: 13px;
padding: 6px;
font-size: 10px;
line-height: 10px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
border-radius: 3px;
}

.video-item-title {
display: block;
padding: 0 7px;
height: 40px;
text-decoration: none;
}

.video-item-title h2 {
font-size: 15px;
line-height: 18px;
font-weight: 400;
margin: 0;
max-width: 100%;
height: 40px;
white-space: normal;
overflow: hidden;
}

.video-item-footer {
padding: 15px 7px 10px 7px;
border-top: 1px solid transparent;
height: 48px;
}

.video-item-footer .video-stats .stat {
float: left;
width: 33%;
border-right: 1px solid transparent;
}

.video-item-footer .video-stats .stat:last-child {
border-right: 0 none;
}

.video-item-footer .video-stats p {
margin: 0;
font-size: 13px;
line-height: 22px;
height: 22px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}

.video-item-footer .video-stats p.stat-views {
padding-right: 8px;
}

.video-item-footer .video-stats p.stat-when {
text-align: center;
}

.video-item-footer .video-stats p.stat-rating {
font-size: 20px;
text-align: right;
}

.video-item-footer .video-stats p.stat-rating .ico {
font-size: 16px;
}

.video-item-thumb,.video-item-thumb:before,.video-item-thumb .wrapper,.video-item-thumb .site-wrap,.video-item .video-item-title {
transition: all 0.3s;
}

.video-item .video-item-title {
overflow: hidden;
}

.video-item:hover .video-item-thumb .wrapper {
-webkit-transform: scale(1.35);
-ms-transform: scale(1.35);
transform: scale(1.35);
}

.side-col .video-item:hover .video-item-thumb .wrapper {
-webkit-transform: scale(1.4);
-ms-transform: scale(1.4);
transform: scale(1.4);
}

.video-item.exclusive:hover .video-item-thumb:before {
box-shadow: inset 0 0 0 1px #ec0819, inset 0 0 0 2px #e71d2c, inset 0 0 0 3px #d31926, inset 0 0 0 4px #cb1724;
}

.video-item.featured.exclusive:hover .video-item-thumb:before {
box-shadow: inset 0 0 0 1px #ec0819, inset 0 0 0 0 #e71d2c, inset 0 0 0 1px #da1b27, inset 0 0 0 4px #d31926, inset 0 0 0 5px #ce1725, inset 0 0 0 6px #cb1724;
}

.video-item:hover .video-item-thumb {
height: 194px;
-webkit-backface-visibility: hidden;
overflow:hidden;
}
.video-item .video-item-thumb {
position: relative;
top: 0;
clear: left;
clear: both;
}
.video-item.featured:hover .video-item-thumb {
height: 250px;
}
.video-item:hover .video-item-title,.video-item.featured:hover .video-item-title {
height: 0 !important;
padding: 0 !important;
}

.video-item.exclusive .video-item-thumb:after {
content: '';
width: 79px;
height: 79px;
display: block;
position: absolute;
top: 4px;
left: 4px;
z-index: 2;
background: url("images/label_exclusive.png") 0 0 no-repeat transparent;
}

.video-item.featured .video-item-thumb:after {
top: 6px;
left: 6px;
}

.side-col .video-item .video-item-thumb:after {
top: 0;
left: 0;
}

.video-item-thumb .site-wrap {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
font-size: 0;
text-align: center;
vertical-align: middle;
background-color: rgba(0,0,0,0.3);
-moz-opacity: 0;
opacity: 0;
filter: alpha(opacity=0);
}

.video-item.exclusive:hover .video-item-thumb .site-wrap {
-moz-opacity: 1;
opacity: 1;
filter: alpha(opacity=100);
}

.video-item-thumb .site-wrap:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
}

.video-item-thumb .site-wrap .site-info {
display: inline-block;
vertical-align: middle;
width: 99%;
}

.video-item-thumb .site-info .btn-play {
display: block;
position: relative;
margin: 0 auto;
width: 36px;
height: 36px;
-webkit-border-radius: 36px;
-moz-border-radius: 36px;
-ms-border-radius: 36px;
border-radius: 36px;
}

.video-item-thumb .site-info .btn-play:before {
content: '';
display: block;
position: absolute;
top: 50%;
left: 50%;
margin-top: -7px;
margin-left: -5px;
border-left: 10px solid #fff;
border-top: 7px solid transparent;
border-bottom: 7px solid transparent;
}

.video-item-thumb .site-info .site-logo {
display: block;
margin-top: 10px;
width: 100%;
height: 64px;
background-image: url("images/pdp_logos.png");
background-repeat: no-repeat;
background-color: transparent;
}


Do you have any idea what Im doing wrong?
thankyou

Answer

Remove float:left on this .video-item and replace with display:inline-block

Comments