- This topic has 12 replies, 2 voices, and was last updated 4 years, 5 months ago by
Leo.
-
AuthorPosts
-
December 25, 2018 at 2:42 pm #765396
Bernhard
I would like to make the menu a little nicer.
Desktop menu and mobile menu:
1. I would like to separate the menu items with a line with a colour to defineMobile slideout menu:
2. I want to define the width of the slideout menu (50% or 60%) – actually it seems to be hardcoded in number of pixels
3. I want to be able to define colour and transparency in the area not covered by the menu (actually it seems to be something like 80% black). It would also be nice to be able to configure the transparency of the menu background
4. I would like to have an indent of the submenu items in the slideout navigationThank you for your help
December 25, 2018 at 3:50 pm #765416Leo
StaffCustomer SupportHi there,
1. For desktop:
@media (min-width: 769px) { .main-navigation .main-nav ul li a { border-right: 1px solid #fff; } }
For mobile:
@media (max-width: 768px) { .main-navigation .main-nav ul li a { border-bottom: 1px solid #fff; } }
2. Try this:
.main-navigation.offside { width: 50%; }
3. Try this:
.slideout-overlay { background-color: #fff; }
4. Try this:
@media (max-width: 768px) { .main-navigation .main-nav ul ul li a { padding-left: 30px; } }
All code above are CSS.
Adding CSS: https://docs.generatepress.com/article/adding-css/
December 26, 2018 at 2:28 pm #766171Bernhard
Great, most of your suggestions work as expected. I’m really happy with the results.
The only thing is with the indent in the slideout meny, code@media (max-width: 768px) { .main-navigation .main-nav ul ul li a { padding-left: 15px; } }
This moved the submenu items to the left. They shall be moved to the right. Can you please suggest how to adjust this.
One more thing: To format dashicons on the correct line height, I found in your support board the code
.menu-item .dashicons { display: inline; font-size: inherit; height: auto; width: auto; line-height: inherit; padding-top: 2px; }
and it works so far. The only problem is, on desktop, that in the line below the dashicon, the menu items are shifted to the right of the dashicon.
December 26, 2018 at 6:13 pm #766252Leo
StaffCustomer SupportCurrently don’t see the menu items in the slideout nav:
https://www.screencast.com/t/pcerex8sSFlCan you make it show first so I can see?
https://docs.generatepress.com/article/activating-slide-out-navigation/#empty-slideout-navigationWhat dashicons are you referring to?
Let me know ๐
December 27, 2018 at 2:26 am #766443Bernhard
OK, I fixed the problem with the slideout menu. It was only assigned in German, but not in English and Italian. Thank you.
Another issue I found is that the menu does not show up in the mobile emulation in Chrome.
Beside this, in Chrome for Android and Safari I have the expected result, see screenshot. Only the indent is not yet implemented.
Referring to the desktop view, it works properly with Firefox and Edge. The problem is only with Chrome. Screenshot
The additional CCS code is for now.menu-item .dashicons { display: inline; font-size: inherit; line-height: inherit; padding-top: 2px; } .slideout-navigation .main-nav li { margin-bottom: 6px; } @media { .main-navigation .main-nav ul li a { border-bottom: rgba(349, 81, 57, 0.3) 1px solid; } } .main-navigation.offside { width: 200px; } .slideout-overlay { background-color: rgba(349, 81, 57, 0.1); }
Thank you for your help.
December 27, 2018 at 11:11 am #766902Leo
StaffCustomer SupportWouldn’t worry about the emulator.
I only see this CSS added:
@media (max-width: 768px) { .main-navigation .main-nav ul ul li a { padding-left: 20px; padding-right: 20px; } }
And that’s not what I provided in #4 here: https://generatepress.com/forums/topic/navigation-menu-and-slideout-menu/#post-765416
Can you also disable the caching plugin while we are working on this?
December 27, 2018 at 12:37 pm #766993Bernhard
Hi Leo,
I don’t know where this CSS comes from. This is the full code of additional CSS:/* Blocksatz */ .entry-content p {text-align: justify;} /* Line break before title */ h1, h2, h3, h4, h5, h6 { clear: both} @media (max-width: 768px) { #right-sidebar { display: none; } } .generate-back-to-top, .generate-back-to-top:visited { border-radius: 25px; /* how round the button is */ line-height: 50px; /* how tall it is */ width: 50px; /* how wide it is */ } .generate-back-to-top { font-size: 30px; background: #931b31; color: #ffc233; } .generate-back-to-top:hover, .generate-back-to-top:focus { background: #F6B432; color: #FFFFFF; } .menu-item .dashicons { display: inline; font-size: inherit; line-height: inherit; padding-top: 2px; } .slideout-navigation .main-nav li { margin-bottom: 6px; } @media { .main-navigation .main-nav ul li a { border-bottom: rgba(349, 81, 57, 0.3) 1px solid; } } .main-navigation.offside { width: 200px; } .slideout-overlay { background-color: rgba(349, 81, 57, 0.1); }
I use WP Fastest Cache, Autoptimize and Clearfy. Is there something that may mix up the code?
I tested #4 but it shifted the submenu items to the left.
To disable the cache plugin, this is actually only possible between 3pm and 9pm your local time. Let me know, which one to disable (WP Fastest Cache, Autoptimize, Clearfy) and when.
December 27, 2018 at 12:49 pm #767004Leo
StaffCustomer SupportI need all caching plugins disabled to see the source of the code.
Not sure why it’s only possible during those time? Your site will continue to work without those plugins.
December 27, 2018 at 1:43 pm #767039Bernhard
Actually I have some traffic peaks and my system is too slow without cache.
December 27, 2018 at 3:07 pm #767099Bernhard
Clearfy, Autoptimize and WP Fastest Cache are disabled now.
December 27, 2018 at 7:27 pm #767202Leo
StaffCustomer SupportEdited the CSS in #4 here: https://generatepress.com/forums/topic/navigation-menu-and-slideout-menu/#post-765416
December 27, 2018 at 11:20 pm #767264Bernhard
Perfect, thank you.
December 28, 2018 at 9:09 am #767830Leo
StaffCustomer SupportNo problem ๐
-
AuthorPosts
- You must be logged in to reply to this topic.