Archived topic
Add span in link menu
5 replies · Started by alexis on August 27, 2021
Hello,
I want to add a span tag in the "a" tag of my menu, in order to make a css animation like on my buttons. How can I do that please?
Hi Alexis,
You can actually add HTML tags to the Label of your menu items when you add/edit then on Appearance > Menu.
Say, for example, The label Chambre d’hôtes can be wrapped like <span class="your-class-here">Chambre d’hôtes</span> and place it on the label field when you add a label on the menu as shown here - https://share.getcloudapp.com/eDuRjR5e
Ok thanks but how to add a class to the attribute "a" because when I add a class it applies to the li
Hi there,
Any specific reason you need to add class to a?
If you just want to target the a, you can use something like this li.your-class a
Ok thanks sorry, I had forgotten to reply
No problem :)