Menu Item Styling - Question | JoomShaper

Menu Item Styling

Geoffrey Smith

Geoffrey Smith

Template 4 years ago

how can i style a menu button like the get tickets menu button in the keynote template

0
12 Answers
Ariba
Ariba
Accepted Answer
Support Agent 4 years ago #19712

You are welcome.

"li:nth-child(1)" is the menu item 1 - which "Home". Use 2 for "Offerings", 3 for "Contact" and 4 for "Events".

0
Ariba
Ariba
Accepted Answer
Support Agent 4 years ago #19534

Hello

If you want to style your menu button like the Get ticket one in Keynote, you can do that using Custom CSS. Kindly allow me some time, i will get back to you.

0
Ariba
Ariba
Accepted Answer
Support Agent 4 years ago #19537

Kindly check the screenshot below. Is this how you want your menu to look like? Or do you want to style all the menu in this way? Can you kindly confirm?

menu style button.JPG

0
Geoffrey Smith
Geoffrey Smith
Accepted Answer
4 years ago #19538

I want to style and individual menu entry that way, like yoiu have done for the home item

0
Geoffrey Smith
Geoffrey Smith
Accepted Answer
4 years ago #19634

So how can I get this styling into the site?

0
Ariba
Ariba
Accepted Answer
Support Agent 4 years ago #19700

Hello,

You can use the following code. Insert them in the Custom CSS section.

.sp-megamenu-parent > li > a {
    border-color: #ff025a;
    background-color: #ff025a;
    color: #fff;
    display: inline-block;
    border: 1px solid transparent;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.25;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
    margin: 0px 5px;
}
0
Geoffrey Smith
Geoffrey Smith
Accepted Answer
4 years ago #19706

Thanks, but this styles the whole of the menu. Is there a way to style just an individual menu item?

0
Ariba
Ariba
Accepted Answer
Support Agent 4 years ago #19708

Hello,

You are welcome. Use the following code instead -

Here nth-child(1) is the menu you want to modify. Change the number accordingly.

.sp-megamenu-parent > li:nth-child(1) > a {
    border-color: #ff025a;
    background-color: #ff025a;
    color: #fff;
    display: inline-block;
    border: 1px solid transparent;
    padding: 8px 12px;
    font-size: 16px;
    line-height: 1.25;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
    margin: 0px 5px;
}
0
Geoffrey Smith
Geoffrey Smith
Accepted Answer
4 years ago #19711

Thank you. Is the "li:nth-child(1)" the item relative position or the menu item 1d?

0
Ariba
Ariba
Accepted Answer
Support Agent 4 years ago #19716

Have a great day.

Stay safe and well.

0
Pavel
Pavel
Accepted Answer
4 years ago #19768

Thank you. Is the "li:nth-child(1)" the item relative position or the menu item 1d?

Hi. A more correct way. You can add unique class to the menu item link in the menu item settings and use this class instead li:nth-child(1) > a

0
Geoffrey Smith
Geoffrey Smith
Accepted Answer
4 years ago #19807

How would I do that ansd what would the code look like? Thanks

0