I have a menu
that's within a div that I hide off screen. When the menu-button
is pressed I bring the menu
in to view. Whilst doing this, I shift the visible content of the body over to one side, allowing room for the menu
.
When I originally did this, I placed overflow-x:hidden;
in the body and it worked perfectly for desktops. When I loaded the website on to my phone, I noticed that the phone didn't behave the same - it attempt to display the menu
and all of the content that was on the screen.
I did a little reading and it stated that mobile browsers ignore overflow-x
when placed in the html or body tags and a wrapper div should be created.
When i made this edit my menu
vanished. When I click the menu-button
, the content moves across for the menu
but it doesn't appear.
What is going on here? I don't quite understand why the menu
would disappear. How can I fix this?
The wrapper that I made is....
#body_wrapper{
overflow-x: hidden;
}
<div id="body_wrapper">
My nav bar...
My menu...
my content...
</div>
My website is - http://robingham.co.uk/LUUCC6/index.php
This current edit of the website has the overflow-x:hidden;
set in the body of the CSS, not the body_wrapper. So the menu displays but it doesn't properly function on a mobile.