- This topic has 10 replies, 3 voices, and was last updated 7 years, 3 months ago by Tom.
-
AuthorPosts
-
December 27, 2016 at 1:02 am #258047Farokh
Hi Tom ๐
I use page header to have transparent menu, and when I scroll down, and go to other pages my sticky menu background is white which is good.
I only need to make the sticky menu background semi transparent on every page.
Thank you
December 27, 2016 at 10:06 am #258149TomLead DeveloperLead DeveloperTransparency is coming to background colors in the next version of GP Premium.
For now, you could do this:
.main-navigation.navigation-clone, .main-navigation.is_stuck { background: rgba( 255,255,255, 0.5 ); }
December 27, 2016 at 11:33 am #258191FarokhThank you and how can I have semi-transparent sub-primary menus items?
December 27, 2016 at 2:04 pm #258237LeoStaffCustomer SupportTry this CSS:
.main-navigation .main-nav ul ul li a { background: rgba( 255,255,255, 0.5 ); }
Let us know.
December 27, 2016 at 2:30 pm #258242FarokhGreat, thank you Leo
There is always one more question;
Is it possible to have Only Primary sub-menus in rtl direction?
I tried something like this:
.main-navigation .main-nav ul ul li a { direction: rtl; }
Did not work
December 27, 2016 at 7:28 pm #258304TomLead DeveloperLead DeveloperYou could try this:
.main-navigation .main-nav > ul > li > ul > li a { direction: rtl; text-align: right; }
December 28, 2016 at 4:36 am #258405FarokhItโs almost perfect, only the BOX which contains primary sub-navi items opens to the right (instead of left), putting sub-items of one primary item under a different primary item
December 28, 2016 at 5:20 am #258425FarokhI hope my explanation wasn’t too vague.
In case it was, please take a look @
lingaline.com > Menu Item: ุชู ุงุณ ุจุง ู ุง
Thanks
December 28, 2016 at 9:50 am #258513TomLead DeveloperLead DeveloperAh, try this CSS:
.main-navigation ul ul { left: auto; right: 0; }
December 28, 2016 at 3:52 pm #258604FarokhPERFECT ๐ Thank You.
Off course, I added some padding to sub-nav items to stand in line with the primary item ๐
Here is the full CSS for a fully functional RTL menu, with a touch of transparency, and without toggles:
.menu-item-has-children .dropdown-menu-toggle { display: none; } .main-navigation .main-nav ul li.menu-item-has-children > a { padding-right: 20px; } .main-navigation { direction: rtl; text-align: right; } .main-navigation .main-nav > ul > li > ul > li a { direction: rtl; text-align: right; padding-right: 20px; } .main-navigation ul ul { left: auto; right: 0; } .main-navigation.navigation-clone, .main-navigation.is_stuck { background: rgba( 255,255,255, 0.9 ); } .main-navigation .main-nav ul ul li a { background: rgba( 255,255,255, 0.9 ); }
I changed the order a bit;
Off course, I don’t know if the order matters, or if it’s in the right order.
But it worked great for me.December 28, 2016 at 11:26 pm #258690TomLead DeveloperLead DeveloperAwesome, thanks for sharing your code! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.