Open saibansal opened 6 years ago
First you need to check if user is in landscape or portrait mode. There are many options that you can achieve this. I used to use this code to detect user's orientation mode.
if(window.innerHeight > window.innerWidth){
console.log('We are in portrait mode');
}else{
console.log('We are in landscape mode');
}
Then you can simple set height for your container with JavaScript
Hi
i am using this scroll bar but having problem with landscpe and portrat mode.
how can i set different height as per mobile device orientation