Answers for "forcing website to show in landscape mode only"

CSS
0

forcing website to show in landscape mode only

<style type="text/css">
    #warning-message{ 
      display: none; 
	}
    @media only screen and (orientation:portrait){
        #wrapper { 
          display:none; 
      	}
        #warning-message { 
          display:block; 
      	}
    }
    @media only screen and (orientation:landscape){
        #warning-message{
          display:none; 
      }
    }
</style>

....

<div id="wrapper">
    <!-- your html for your website -->
</div>
<div id="warning-message">
    this website is only viewable in landscape mode
</div>
Posted by: Guest on March-31-2020

Code answers related to "forcing website to show in landscape mode only"

Browse Popular Code Answers by Language