Skip to content

Commit 4ded0d5

Browse files
F30rudis
authored andcommitted
Add CSS for responsive YouTube embeds
1 parent e8deeb0 commit 4ded0d5

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/ctf_gameserver/web/static/style.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@ th.border-right, td.border-right {
4343
border-right: 2px solid #DDDDDD;
4444
}
4545

46+
/* See https://martinahonecker.com/youtube-videos-responsive-einbinden/ */
47+
.video-container {
48+
position: relative;
49+
margin-bottom: 20px;
50+
height: 0;
51+
padding-bottom: 56.25%;
52+
}
53+
54+
.video-container iframe, .video-container object, .video-container embed {
55+
position: absolute;
56+
top: 0;
57+
left: 0;
58+
width: 100%;
59+
height: 100%;
60+
}
61+
4662
.image-column {
4763
width: 80px;
4864
}

0 commit comments

Comments
 (0)