Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overflow:hidden not working on mobile browser

Tags:

css

mobile

Im using overflow:hidden to hide my unglam div in my webpage, it works well in all web browser but not in mobile browser. Anyone can help?

body
{
    margin: auto;
    display:block;
    overflow-x:hidden;
    overflow-y:hidden;
    height:800px;
} 
like image 898
youaremysunshine Avatar asked Dec 12 '22 12:12

youaremysunshine


2 Answers

Try adding following line in your html

<meta name="viewport" content="width=device-width, height=device-height">

and test on your phone. Maybe this should help.

like image 178
Pranav Kale Avatar answered Dec 21 '22 09:12

Pranav Kale


Add a wrapper inside your body tag and apply the overflow-x: hidden to that wrapper

like image 42
LolaRoux Avatar answered Dec 21 '22 11:12

LolaRoux