- This topic has 13 replies, 4 voices, and was last updated 2 years, 7 months ago by
David.
-
AuthorPosts
-
October 10, 2020 at 12:38 pm #1482468
Rohan Verma
Hi, currently, I’m using the social follow icon on the main menu but I want similar icons like this: https://prnt.sc/uwu6jd with the divider between search bar.
My site URL: gadgetheadline.com
October 10, 2020 at 7:44 pm #1482716Leo
StaffCustomer SupportHi there,
Try this CSS:
.main-navigation li.search-item { border-right: 1px solid #fff; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
October 11, 2020 at 2:11 am #1482931Rohan Verma
1. Divider line is quite big.
2. I want similar look where the search icon will appear at right side. Here in my case, the search icon on the left side.October 11, 2020 at 5:39 am #1483156David
StaffCustomer SupportHi there,
try this CSS:
.main-navigation .main-nav ul li.search-item a:before { content: ''; position: absolute; left: 0px; border-left: 1px solid #fff; display: block; top: 15px; bottom: 15px; }
Then edit the Menu and remove the
menu-item-float-right
class from both of the social icon menus.October 11, 2020 at 12:38 pm #1483754Rohan Verma
Thanks. Now, how can I reduce the social icon padding for all devices?
October 11, 2020 at 3:54 pm #1483907Elvin
StaffCustomer SupportHi,
Thanks. Now, how can I reduce the social icon padding for all devices?
You can adjust that through this CSS:
.main-navigation .main-nav ul li a { padding-left: 20px; padding-right: 20px; line-height: 60px; }
This is your current setting for the nav icons. As you can see, there’s no top and bottom padding. You’ll have to change the line-height if you want to change the “vertical spacing”.
Note: after doing changes, make sure to clear cache. Your CSS is being cached by autoptimize so you may have to clear cache for the changes to reflect on the live site.
October 11, 2020 at 9:53 pm #1484119Rohan Verma
Yes cache cleared and the code worked. But the category menu item on the first left seems too close than other category items.
Check the screenshot: https://prnt.sc/uxhaye
October 12, 2020 at 5:22 am #1484624David
StaffCustomer SupportYou would need to give each of your Social Icon menu items a CSS class eg.
social-icon
then you can target that with this CSS instead:.main-navigation .main-nav ul li.social-icon a { padding-left: 20px; padding-right: 20px; line-height: 60px; }
This won’t affect the normal menu items.
October 14, 2020 at 11:31 am #1489078Rohan Verma
Thanks, it’s working.
Now, how can I adjust the social icons horizontally on the mobile menu?
October 14, 2020 at 12:26 pm #1489142Leo
StaffCustomer SupportYour site looks like this to me right now:
https://www.screencast.com/t/n8ndBkI0dZhDCan you try clear and disabling WP Rocket and any other caching plugins you are using first?
Let me know 🙂
October 15, 2020 at 12:26 pm #1490950Rohan Verma
Yes. Can you check now for the mobile view?
October 16, 2020 at 1:47 am #1491560David
StaffCustomer SupportTry adding this CSS:
#mobile-header.toggled .main-nav > ul { display: flex; flex-wrap: wrap; } .main-navigation.toggled .main-nav li:not(.social-icon) { flex: 1 0 100%; } .main-navigation.toggled .main-nav li.social-icon { flex: 0 0 10%; /* Adjust 10% to increase space around each icon */ } .main-navigation.toggled .main-nav li.social-icon a { padding-left: 10px; padding-right: 10px; text-align: center; }
October 20, 2020 at 7:03 am #1496978Rohan Verma
Thanks. Looks good.
October 20, 2020 at 9:39 am #1497363David
StaffCustomer SupportGlad we could be of help
-
AuthorPosts
- You must be logged in to reply to this topic.