Jump to content

How to lock screen orientation with JS?

Recommended Posts

Site URL: https://jordandixon.co

Here my site: https://jordandixon.co
The issue is on mobile.
I'd like to lock the screen orientation to portrait. 
If you turn your phone sideways on my current mobile site it looks bad. 

Any tips on how to do this with Javascript? I know there is an API for this but I'm unsure how to integrate it within Squarespace. I would appreciate any insight at all if anyone has come up with a similar solution.

Thanks in advance!
 

Link to comment
  • Replies 4
  • Views 792
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 year later...
On 8/2/2022 at 7:34 PM, LaureneRobertStudio said:

Hello @tuanphan & @jordandixon

 

Did you find a solution ? 

My client also want to lock the screen orientation to portrait on mobile.

 

Thanks a lot for your help ! 

Laurène

What is your site url?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks 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.