I'm working on making a mobile version for the landing page of my game. I have a youtube trailer in it which should scale according to the website size while keeping centered. But it don't. You can see yourself on my website http://www.zatackaonline.net by scaling the browser size down.
I tried using this code which I found on another post on StackOverflow. This code will instead fill the whole screen which I don't want it to. Is there any way I could shrink it to be 50% size while keeping the embeded iFrame video position centered?
/*main.css*/
.video-container {
position: relative; /* keeps the aspect ratio */
padding-bottom: 56%; /* fine tunes the video positioning */
padding-top: 60px;
overflow: hidden;
}
.video-container iframe,
.video-container object,
.video-container embed { position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;
}