Responsive Video - Embedded

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Nov 20, 2012 6:36 am
Reply with quote
Report this post
Hi there friends,

I found I was having a problem with embedded YouTube videos in K2 items not being responsive. It's easy to do... Might want to add this little bit of css. Just a suggestion and a solution for anyone who may need it.

Add code below to k2.css

Code: Select all
.itemVideoEmbedded {
        position: relative;
        padding-bottom: 56.25%; /* 16:9 */
        padding-top: 25px;
        height: 0;
}

.itemVideoEmbedded iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
}
User avatar
Fresh Boarder

GK User
Tue Nov 20, 2012 8:52 am
Reply with quote
Report this post
Thanks for posting your code, surely it will be valuable for other members.
User avatar
Platinum Boarder


cron