SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot godfather999's Avatar
    Join Date
    Sep 2011
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to clear "mobile" menu after resizing to "descktop screen" size?

    If you visit this website: http://demdous.com/examples/html/serendipity/
    and resite it to mobile size, then open the menu and dont close it. Now resize to fullscreen and you will see that mobile menu is still there. How to fix that?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Why do you need to 'fix' that? Not a single one of your users will ever do that with their browser.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You could hide the menu with a media query for the larger screen sizes.

    Code:
    @media only screen and (min-width: 960px){
    .menu-device{display:none!important}
    }
    It will re-appear when going back smaller again though but the user will then be able to switch it off. That seems to be the way most of those mobile collapsible menus work (e.g. bootstrap for example).

    As Ralph said it's unlikely that a user will open the menu and then widen the browser but I see no harm in making sure the menu is not visible at wider widths.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •