I am trying to create a webpage that when viewed on a mobile device automatically fixes to landscape orientation as opposed to portrait. It is a very simple page which at the moment just contains a video via iframe.
I have used code that I have found that was developed by somebody else. The code I am trying to implement is in this JSFiddle.
Here is a livelink of my attempt at getting this code to work. Could somebody please tell me why this code is not working?
Below is my code.
CSS
body, html
{
margin: 0; padding: 0; height: 100%; overflow: hidden;
}
#content
{
position:absolute; left: 0; right: 0; bottom: 0; top: 0px; top: -15px;
min-height: 100%;
min-width: 100%
}
html, body {
height: 100%;
min-height: 100%;
}
@media screen and (orientation:portrait) {
body {
transform: rotate(-90deg);
transform-origin: 50% 50%;
}
HTML
<div id="content">
<iframe src="//fast.wistia.net/embed/iframe/qnca9gdlv5?videoFoam=true" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="640" height="388"></iframe><script src="//fast.wistia.net/assets/external/E-v1.js"> </script>
</div>