Archived topic
Different padding for menu elements of primary navigation?
3 replies · Started by Jose Antonio on March 8, 2017
Hi!
I want to established a padding for a few elements of my primary navigation, but other padding different for others.
The problem is if I establish a "Left/Right spacing" in Appearence options for this menu, this is applied for all elements of the menú and, even if adding CSS class for this elements, that "left/right spacing" is still being applied.
You can view that in http://www.agustingrau.com
My intention is expand left/right spacing in the elements of the center in primary Navigation ("Libertad financiera", "Sobre mi", "blog", etc.) but not in the social icons of the right.
Thank you and regards!
Hi Jose,
We can use Custom Classes in the menu for that: https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes
So for all the menu items that you want extra padding, add special-padding to the CSS Classes field, then add this CSS:
.special-padding {
padding-left: 50px;
padding-right: 50px;
}
Let me know.
Hi Leo,
I'm stupid. Just that you comment me was that I was doing before write you. But I had an error syntax that I had not seen. ><
Sorry for your lost time. Thank you.
No worries. You're welcome!