-
AuthorPosts
-
July 7, 2015 at 3:02 pm #323572
Hi,
I have a mega menu with multiple categories and subcategory drop downs. When hovering over a subcategory, the drop down menu appears on the left and obstructs the view of the other categories. Can this alignment and spacing be changed? Can it be changed for just one subcategory drop down menu?
My URL is http://test.burn-blog.com/
July 7, 2015 at 3:41 pm #323623Hi there,
Thanks for writing in! Please add the following code in your Customizer via Appearance > Customize > Custom > CSS:
.masthead-inline .x-navbar .desktop .sub-menu .sub-menu { top: -1.025em !important; right: 0 !important; left: 71% !important; }
Let us know how this goes!
July 13, 2015 at 4:18 pm #329082Thank you, the code works, however the padding in the drop downs under “Recipes” doesn’t match the padding on the drop down under “Stories.” There is more space in the Stories > Reviews dropdown. Weird. Can you help?
July 13, 2015 at 4:32 pm #329095Hi There,
The spacing is same as it’s fixed space. As your menu texts are bit smaller for Stories, it seems a bit more space although they are same. However you can decrease the spacing a bit for that item –
#menu-item-8955 .sub-menu { left: 60% !important; }
If you have other concern. please clarify a bit with a screenshot.
Hope this helps.
Cheers!
July 14, 2015 at 12:48 am #329424Thank you this works! One more question. How can I manipulate the size of the sub- drop down menus so that the black doesn’t cover the main menu items when hovered over? Better yet, in what code line can I just turn off the hover while inspecting the element with FireFox so that I can easily figure out what CSS I’d like to manipulate myself?
Appreciate the help thank you.
July 14, 2015 at 2:01 am #329509Hi,
You can add this under Custom > CSS in the Customizer.
body .x-navbar .desktop .x-nav > li ul { top: 127px; }
You may change 127px to achieve your desired result.
With regards to inspecting element with firefox, please refer to the link below.
https://developer.mozilla.org/en/docs/Tools/Web_Console
Thanks
July 15, 2015 at 1:57 pm #331314Sorry if I wasn’t clear, the issue I’m having can be seen in the following screenshot:
Note how the sub menu “Reviews” is too wide when hovered over and partially covers the main menu items under “News” in black. The same thing occurs when hovering over “BBQ, Grilling & Smoking” and actually covers all of the menu items under “Stories”:
These sub menus are unnecessarily wide. How can I fix them?
Thanks for the other info.
July 15, 2015 at 2:25 pm #331340Hi There,
Thanks for updating! For the submenu of dropdown you can change the below class –
.desktop .x-nav .x-megamenu > .sub-menu > li > .sub-menu { background: #f54; max-width: 150px; }
Now, add your own CSS rule to set a maximum width to shrink it, set background color etc.
Hope this helps.
Cheers!
July 15, 2015 at 3:35 pm #331422The sub menu still obstructs the view of the items under Stories when hovered over…
July 15, 2015 at 4:08 pm #331458Hi There,
Let’s update the code for different class –
.masthead-inline .x-navbar .desktop .sub-menu .sub-menu .sub-menu { background: #f54; left: 50% !important; min-width: 150px; }
You can change/remove the left value here. Change/Add other CSS rules with your own.
Also note that you have different positioning for the Stories submenu. Let’s also update that if you need –
#menu-item-8955 .sub-menu { left: 50% !important; }
Let us know how it goes.
Cheers!
July 15, 2015 at 4:49 pm #331482Thank you, this is starting to work! A few more questions: How can I center the text in the sub menu rather than it being left aligned? Also, gray lines have all of a sudden appeared above the main menu items. I’d like to get rid of these.
July 15, 2015 at 5:04 pm #331493Hi There,
1. To center the text, you can try –
.masthead-inline .x-navbar .desktop .sub-menu .sub-menu .sub-menu a { text-align: center; }
2. I think grey lines (border top) was always there. However to get rid of that, add –
.desktop .x-nav .x-megamenu > .sub-menu > li > a { border-top: none; }
Hope this helps.
Cheers!
July 15, 2015 at 5:08 pm #331497Oops! I meant to request that the text remain left aligned but centered in the sub menu. How do I do that? You have been a lot of help thank you so much!
July 15, 2015 at 9:18 pm #331634July 16, 2015 at 1:24 am #331802Yes, you’re absolutely right, the text is centered. However, I completely misspoke when I asked you the original question (which is totally my fault). What I meant to ask is, how can I center the left-aligned text within the sub menu? NOT how can I center the text in the sub menu? In other words, I don’t want centered aligned-text, I want left-aligned text to be centered in the menu. Sorry for the confusion and I hope this helps.
-
AuthorPosts