Add CTA Button to Sub Menu items

Posted in: Newspaper
Post count: 52

Trying to do something similar to this.

https://wordpress.org/support/topic/add-button-to-the-menu

Screen Options > CSS Classes

Then assigned custom CSS Classes to each of those four menu items in the menu

tips-news
obituary
birth-announcement
wedding-engagement

So just need to know what CSS I need to be able to target those sub menu items

.sub-menu .nav li.tips-news {
position: relative;
bottom: 10px;
padding: 2px;
line-height: 19px;
vertical-align: middle;
}

.sub-menu .nav li.tips-news a {
color: #FFF;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.31);
padding: 3px 13px;
}

Thanks in advance.

Post count: 22421

Hi,

It depends on what you want to target. For example: http://screencast.com/t/xq06gBpZRx
If you want to target the li item, then you can use the class directly like so:
.customclass5{
yourcodehere
}

If you want to target the a link from the menu item you have to use it like so:
.customclass5 a{
yourcodehere
}

You can use your browser inspector to get all the menu classes: http://screencast.com/t/J5OL8GhtcP2y
In our theme every menu item has a specific class like for example the menu item i added a custom class to, also has a unique class that can be targeted so there is no need for the custom class: http://screencast.com/t/D5uDNrrUC1s: menu-item-398

I hope this helps.
Thank you

Post count: 52

Thanks Bogdan.

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.