title: How to lock portait orientation on mobiles and landscape for tablets using css or JS?
body: <p>I am modifying a wordpress theme using elementor, but I cannot modify mobile and tablet landscape in preview.</p>
  
  <p>Because of that, I am forced to block orientation in landscape mode for mobile and portrait for tablets because it looks bad.</p>
  
  <p>I have contacted the developers of the theme and they have given me a valid solution in css. I provided the code, but when the keyboard opens, the page breaks.</p>
  
  <p>Any simple solution in JavaScript or css?</p>
  
  <p>I would also like to add if you know how to include an image of turning your device.</p>
  
  <p>Thank you for your attention, greetings and thanks to all.</p>
  
  <p><a href="https://i.stack.imgur.com/2jUUi.jpg" rel="nofollow noreferrer">enter image description here</a></p>