Jump to content

how to force landscape in the view of mobile

Recommended Posts

Hi i wanna add code to force the mobile version in landscape only, but i tried code as 

@media screen and (orientation: portrait) {
.main {
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
transform: rotate(-90deg);
width: 100vh;
 height: 100vh;
overflow: hidden;
@media screen and (orientation: landscape) {
.main {
-moz-transform: rotate(0);
-ms-transform: rotate(0);
transform: rotate(0)

it doesnt really work, wondering if anyone have the same problem and can provide me some advice. a lot thankx

Link to comment
  • Replies 3
  • Views 1.8k
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.