- This topic has 7 replies, 3 voices, and was last updated 1 year, 7 months ago by Ying.
-
AuthorPosts
-
August 26, 2022 at 2:02 pm #2325083Roger
I have two buttons in my navigation menu, a green “DONATE” and a brown “APPLY” which you can see here https://alternateg1stg.wpengine.com/
When I hover over them, the green and brown colors turn transparent when I would prefer that they each turn to a slightly darker color (darker green and darker brown).
Can you tell me what code I would need to add/modify and where to achieve that?
Thank you.
August 26, 2022 at 2:18 pm #2325091LeoStaffCustomer SupportHi Roger,
Go to the Additional CSS field in the customizer and edit these two snippets:
.main-navigation:not(.slideout-navigation) .main-nav li.online-button a { background-color:#56BD60; color: #ffffff; border: 3px solid #FFFFFF; /* White */ line-height: 40px; padding: 0px 24px; border-radius: 20px; margin-left: 20px; transition: all 0.5s ease 0s; } .main-navigation:not(.slideout-navigation) .main-nav li.online-button a:hover { background-color:rgba(178,139,178,0.8); color: #ffffff; transition: all 0.5s ease 0s; } /* studio classes menu button */ .main-navigation:not(.slideout-navigation) .main-nav li.studio-button a { background-color:#8C7051; color: #ffffff; border: 3px solid #FFFFFF; /* White */ line-height: 40px; padding: 0px 24px; border-radius: 20px; margin-left: 30px; transition: all 0.5s ease 0s; } .main-navigation:not(.slideout-navigation) .main-nav li.studio-button a:hover { background-color: rgba(132,140,183,0.8); color: #ffffff; transition: all 0.5s ease 0s; }
Let me know if this helps ๐
August 29, 2022 at 9:03 am #2327401RogerThanks for this info. Unfortunately, when I edit the hover cover for the buttons, it’s still not working as I want, i.e. it’s still going transparent. You can see for yourself here: https://alternateg1stg.wpengine.com/
I’m using the merge element sitewide. Does that have some impact on the CSS code for the primary navigation? I ask because the background cover hover on the buttons seems to work properly when I’m not using the merge.
August 29, 2022 at 11:18 am #2327524YingStaffCustomer SupportHi Roger,
Yes, the merged header adds some CSS to override your CSS.
Try add
!important
to your CSS and switch thehover
state to theli
element instead ofa
, for example:.main-navigation:not(.slideout-navigation) .main-nav li.online-button:hover a { background-color:rgba(178,139,178,0.8) !important; color: #ffffff !important; transition: all 0.5s ease 0s; } .main-navigation:not(.slideout-navigation) .main-nav li.studio-button:hover a { background-color: rgba(132,140,183,0.8) !important; color: #ffffff !important; transition: all 0.5s ease 0s; }
August 29, 2022 at 4:12 pm #2327724RogerThanks, Ying. I tackled that one.
I want to do the same thing (change the hover cover) for the “join” button in the footer widget. Can you tell me what css I need for that one?
August 29, 2022 at 5:38 pm #2327761YingStaffCustomer SupportTry this:
.site-footer aside#text-8 button:hover { background-color: red; }
August 30, 2022 at 12:30 pm #2328741RogerThanks, Ying!
August 30, 2022 at 12:44 pm #2328758YingStaffCustomer SupportNo problem ๐
-
AuthorPosts
- You must be logged in to reply to this topic.