Viewing website in browser on mobile device then a message pops-up


I’m creating a website with hype. On mobile devices like a smartphone and a tablet the website is best viewed in landscape view. My question is now, when a person is viewing the website in a browser on a smartphone or a tablet in portrait mode is it possible that a message pops up with a little text or an image with the notification that it is better to turn the device in landscape mode for best view and experience.

Thanks for the assistance

you can do it with CSS

in this example the message is hidden through CSS with the style “display"none”.

this class will be visibile only in portrait view via MediaQuery ( the code below, in the symbol )

.portrait{ display: none !important; }

@media only screen 
and (orientation : portrait)  {
.portrait{ display: block !important; }

BTW: you must publish the example or use Hype Reflect. (110.6 KB)

1 Like

I didn’t know that it is that easy.