Archived topic
sitemenu acting strange
10 replies · Started by Raymond on June 1, 2017
Hi Tom,
I'm developping a site at http://dev.branoul.nl. I recently discovered that the main menu is acting strange when resizing the browserwindow. At first I thought this behaviour was due to some CSS edits I made, but after reverting to a previous version of the site I noticed the strange menu-resize bug stayed.
Steps to replicate are:
- Maximize the browserwindow
- Refresh http://dev.branoul.nl
- Unmaximize the browserwindows -> the main menu resizes too small but centered
- Refresh http://dev.branoul.nl -> the main menu is allright again
- Resize the browserwindow -> the main menu erroneously stays left-aligned
- Refresh http://dev.branoul.nl -> the main menu is allright again
This behaviour is consistent on all pages, so there's probably no page specific CSS involved.
Can you find out if this is due to GeneratePress CSS?
Regards,
Raymond
Strange, can you try adding this?:
.main-navigation.grid-container {
margin-left: auto !important;
margin-right: auto !important;
}
Looks like a bug with the sticky menu - I'll look into a fix.
Hi Tom,
That resolves it for the menu. Scrolling down, however, the menu moves to the right now...
Regards,
Raymond
Further investigation shows the menu moves to the right when the browserwidth is greater than 1140px. Removing margin-left: auto !important from .main-navigation.grid-container then centers the menu.
Any chance I can send you an updated version to test? If so, shoot me an email: https://generatepress.com/contact/
Yes, please. I sent the reply via an 'account issue post' on your contact page. Couldn't find a mail address :)
Hi Tom,
I think I found the problem. I use the plugin SiteOrigin CSS to make CSS editing somewhat easier. When I disable this plugin the menu problem is gone. I think I will revert to adding an external CSS file with a custom hook.
Regards,
Raymond
I'm really confused now...
I disabled SiteOrigin CSS and found that the problem returned. Then I downloaded your latest GP version from GitHub and it seemed to work, but later...it didn't. I guess the browsercache is fooling me. So I tried it on a different computer. The last status is:
- The site is running the latest GP version from GitHub
- I removed SiteOrigin CSS
- The problem still exsists
I hope you can make sense of this.
Regards,
Raymond
I just sent you the latest to upload.
Let me know if it fixes it :)
Hi tom,
The lastest version works perfectly. For the benefit of my learning, what did you change?
Thanks and regards,
Raymond
I just made some adjustments to how the sticky nav calculates things :)