Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Need help with CSS ONLY Mobile Menus please...

  1. #1
    Join Date
    Apr 2015
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Need help with CSS ONLY Mobile Menus please...

    Hi I'm new here and could really use some help.

    I've looked high and low over the Internet for a CSS Only Mobile menu that is 3 levels deep. I.e., a vertical menu that allows for the Main Menu Item, one level below that, and One sub level to that! Or:

    Menu Item
    Menu Category
    Menu Category Article

    I found some code from Stu Nichols (which is where I found the link to the Dynamic Drive website and forums) but it includes some javascript and I honestly can't quite make heads or tails of the complete source code. So I came to the Dynamic Drive full screen menu.

    And I need some help. Please. First, on the Dynamic Drive menu - it includes a snippet of javascript - which would be fine if I understood javascrip even a little bit, but since I don't, can anyone tell me where to include the javascript included in that menu? And second, can the menu be adapted to have three levels? Like the one I linked to from Stu Nichols above...

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The JavaScript inside Full Screen Menu should just be added to your page as it relative to the CSS. There are two code chunks you need to add to your page- the "CSS" portion goes into the HEAD section of your page (which includes the JavaScript code), and the "HTML" section in the BODY section of your page.

    As far as changing the menu to have multiple levels, it's possible, though with extra real estate offered by a full screen menu, you're better off just flatting the menu and showing everything all at once inside it.
    DD Admin

  3. #3
    Join Date
    Apr 2015
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the response, it is very appreciated.

    Okay, I get the CSS and HTML code and understand where the CSS link to a style sheet goes and where the HTML goes (I do know both CSS and HTML fairly well, I just don't know Javascropt) but this is the snippet of code I don't know where to put:

    expandfullscreenmenu(action)

    The problem with inserting the entire 3-level menu into a a full screen menu - it wouldn't fit. My website has over 190 pages! My main menu has 11 Top level items. Many of them have not just one, but two levels below that. In other words, my example expanded would look like this:

    Menu Item1
    Menu1 Category1
    Menu1 Category1 Article1
    Menu1 Category1 Article2
    Menu1 Category1 Article3
    Menu1 Category2
    Menu1 Category2 Article1
    Menu1 Category2 Article2
    Menu1 Category2 Article3
    Menu1 Category3
    Menu1 Category3 Article1
    Menu1 Category3 Article2
    Menu1 Category3 Article3
    Menu Item2
    Menu2 Category1
    Menu2 Category1 Article1
    Menu2 Category1 Article2
    Menu2 Category1 Article3
    Menu2 Category2
    Menu2 Category2 Article1
    Menu2 Category2 Article2
    Menu2 Category2 Article3

    And so on, for 11 different main menu items! That many menu items will not fit on one vertical menu! There-in lies my dilemma. (sigh) I realize that's a lot of info, but the website covers a LOT of information.

    Any suggestions?

  4. #4
    Join Date
    Apr 2015
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I figured out the javascript snippet (I feel kind-of stupid now, but it was way more simple than I thought!) )

    However, I'm getting a weird effect. When I size my screen down to what the width of a mobile device would be (unfortunately I don't have a "smart phone" to be able to test this on) but the top level menu item disappears - it moves up out of the view of the menu. Here's a link to my "test" full page menu TestDDVerticalMenu Note: I do not have this set up to actually link to the website as of now, once I get it working correctly I will add the actual website to it so that when you click on a link it will actually work
    Thanks for any help on this weird issue...

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    However, I'm getting a weird effect. When I size my screen down to what the width of a mobile device would be (unfortunately I don't have a "smart phone" to be able to test this on) but the top level menu item disappears
    Ah this is a bug of the menu itself. Inside its CSS, try adding the line in red to the existing CSS code block:

    Code:
    nav#expand-fullpagemenu ul{
      list-style: none;
      margin: 0;
      padding: 0;
      position: relative;
      max-height: 100%;
      top: 50%; /* center UL vertically inside nav */
      -webkit-transform: translateY(-50%); /* center UL vertically inside nav */
      transform: translateY(-50%);
      font: bold 2em 'Bitter', sans-serif; /* use google font inside nav UL */
    }
    DD Admin

  6. #6
    Join Date
    Apr 2015
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Perfect! Thank you SO much!

    Now I just have to figure out how to make each of those menu items have an "accordion" (and some of them will need two levels!) but at least now I am looking at a working mobile menu!

    If/when I get the code working, I'll post it here so others will have it to use. Thanks again for the help. If you have any suggestions for the accordion code, I'd sure love the assistance

  7. #7
    Join Date
    Apr 2015
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hmmm, I was just testing in other browsers (I try to test using Firefox, Chrome, IE8 and Opera) and in Safari, which I admit I have an old version - I think it's 5.1x, but it doesn't work in Safari. The icon shows up just fine, but when you click on it the menu does not open. Any suggestions?

  8. #8
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Which accordion menu are you trying to integrate with Full screen menu? You mentioned 5.1x?
    DD Admin

  9. #9
    Join Date
    Apr 2015
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi DD - thanks for responding. It's the one I linked to above - but here is the URL:

    http://www.dynamicdrive.com/style/cs...n_expand_menu/

    I have it working perfectly in Firefox, IE8, Opera, Chrome - but in Safari (I think it's v5.1) it doesn't even show up Maybe it's the old version of Safari - but since I'm not a Mac user, I have never updated. If anyone has a more current version of Safari and it works, then I'll update, but truly - don't we want to program for some (not all, but some) of the older browsers? Any help is much appreciated.

  10. #10
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ah ok you're referring to Safari 5.1 (I thought it was the version of an accordion menu you're adding inside the full screen menu). I see the issue. It seems like older Safari has issues animating the "visibility" property. Inside the following two selectors:

    Code:
    nav#expand-fullpagemenu{
    
    }
    and

    Code:
    input[type="checkbox"]#togglebox:checked ~ nav#expand-fullpagemenu{ /* nav state when corresponding checkbox is checked */
    
    
    }
    Try removing the property "visibility: hidden" and "visibility: visible" from the two selectors, respectively.
    DD Admin

  11. The Following User Says Thank You to ddadmin For This Useful Post:

    Coleenh (05-05-2015)

Similar Threads

  1. Replies: 0
    Last Post: 03-02-2014, 12:59 PM
  2. ASP.NET 4 Mobile Web App - Please Help
    By me_myself in forum ASP
    Replies: 2
    Last Post: 07-12-2011, 02:38 PM
  3. mobile cms
    By davidjmorin in forum Looking for such a script or service
    Replies: 3
    Last Post: 12-21-2007, 01:22 AM
  4. Replies: 3
    Last Post: 05-02-2007, 11:51 PM
  5. Setting sub menus to stay on top of other menus?
    By apk in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 05-08-2006, 11:11 AM

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
  •