Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Header Nav Menu Challenge

I'll throw you guys a bone. I'm currently at work and can't give you guys a hand, but within Google Chrome, press CTRL + SHIFT + I, then CTRL + SHIFT + M to switch the aspect ratio to multiple devices or one that you'd like to mess around with. As I see it, the default iPad resolution is having some issues. If this isn't fixed by the time I come home, I'll mess around with it.
Here something I through together - https://i.imgur.com/htgFORg.png

Regarding the issue with the zoom - you might want to look into just implementing some sort of a grid system to make the entire site mobile responsive. I can easily help you with this. My personal favorite is Bulma - https://bulma.io
(Nov 7, 2017 01:02 PM)FamousHater Wrote:  already been stated. it does that for everyone thats on an Ios device.

I'm on Android, and it does the same for me. So it's not an iOS issue.
(Nov 7, 2017 03:21 PM)Bαker Wrote:  Here something I through together - https://i.imgur.com/htgFORg.png

Regarding the issue with the zoom - you might want to look into just implementing some sort of a grid system to make the entire site mobile responsive. I can easily help you with this. My personal favorite is Bulma - https://bulma.io

I might be wrong but I don't think he needed CSS help.
(Nov 7, 2017 04:05 PM)BritishKitten Wrote:  I might be wrong but I don't think he needed CSS help.

No reason to use JS to make a nav tho, my example was pure CSS
On my android version the menu is fine just the forum doesn't resize.
The menu is responsive but the enter site wasn't. Great job for the effort. 🤝
Code
jQuery(document).ready(function($){

/* prepend menu icon */

$(‘#nav-wrap’).prepend(‘<div id=”menu-icon”>Menu</div>’);

/* toggle nav */

$(“#menu-icon”).on(“click”, function(){

$(“#nav”).slideToggle();

$(this).toggleClass(“active”);

});

});

 For the CSS, make the width of the viewport less than 600px, then make sure to set #menu-icon attribute to display:block.
[Image: new.gif]
We have a MyBB forum, find people there and offer them free upgrades or drugs and they'll help. (@nasyr)
To fix menu fully opening on every page, change
Code
cssmenu.find('ul').show();
to
Code
cssmenu.find('ul').hide();
on line 49 of your topnav.js



For the menu, the goal is to keep it readable while scrolling with the content. Make the following CSS and JS changes:
CSS:
Code
#cssmenu, #cssmenu.smallscreen {
    position: absolute;
    width: 100vw;
    top:0;
    left:0;
}

Javascript:
Code
var leftOffset = parseInt($("#cssmenu").css('left'));
$(window).scroll(function(){
    $('#cssmenu').css({
        'left': $(this).scrollLeft() + leftOffset
    });
});

$("#container").css("margin-top", $("#cssmenu").height());
The CSS pins the navbar to the top, while the JS makes it scroll with the page while also shifting down the content covered by the navbar.

Demo: https://jsfiddle.net/yhygp65d/
Mobile preview: [Image: Screen%20Recording%202017-11-07%20at%200...v=9edf03e5]


Lookup MyBB-GO Mobile, that could possible work.
reality
(Nov 7, 2017 09:35 PM)Orchid Wrote:  Lookup MyBB-GO Mobile, that could possible work.

I was thinking the same thing, the only issue is that it basically switches the theme when it detects that its mobile, which isn't bad, you would just need to replicate the current one for desktops for mobile.

Looks something like:
Spoiler (Click to View)
<3
Hopefully this gets resolved :)
(Nov 7, 2017 09:48 PM)NinjaLeaks Wrote:  I was thinking the same thing, the only issue is that it basically switches the theme when it detects that its mobile, which isn't bad, you would just need to replicate the current one for desktops for mobile.

Looks something like:
Spoiler (Click to View)

It says it is fully customizable, @Omni, do something like this rather than have the NAV bar universal on all platforms, trust me I guarantee if mobile works on a separate code from desktop it will bump. Look at all the members complaining and working around the nav bar on desk top (Adams userscript is one example) and if you can closely resemble the theme but on mobile it will be amazing. No tapatalk shit but you know.
reality
(Nov 8, 2017 07:26 AM)Orchid Wrote:  It says it is fully customizable, @Omni, do something like this rather than have the NAV bar universal on all platforms, trust me I guarantee if mobile works on a separate code from desktop it will bump. Look at all the members complaining and working around the nav bar on desk top (Adams userscript is one example) and if you can closely resemble the theme but on mobile it will be amazing. No tapatalk shit but you know.

It costs way less time to actually fix a navbar than to fully restyle a completely different source for mobile, let alone all the custom alterations on the theme Omni does to add extra features. With current technology it's really no problem to create a cross-device menu.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by reb00t_incApr 5, 2025 10:38 AM 12 342 Apr 5, 2025 10:38 AM
Last Post: Omniscient
by OmniscientJul 29, 2019 11:22 AM 27 738 Jul 29, 2019 11:22 AM
Last Post: Sectoral
by Dread Pirate RobertsOct 4, 2011 11:43 PM 12 129 Oct 4, 2011 11:43 PM
Last Post: Omniscient