#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; } }