Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

trish_tree

New Coder
Hi team,
Here's the css code below I put it in the wordpress, I using the Bridge theme, there's custom CSS I can add on.
it supposed to show the underline animation when hover, but it didn't work as I expected, could anyone help to check where's wrong, thank you!
Screen Shot 2022-02-20 at 5.42.22 PM.png
here's the example for the menu animation:
stockholm89



CSS:
.menu-animation-underline nav.main_menu>ul>li.active>a .menu-text:before{
width: 0;
}

.menu-animation-underline nav.main_menu>ul>li:hover.active>a .menu-text:before{
width: 100%;
}
 
Last edited by a moderator:
I think it'll be easier if I can see your HTML.

But otherwise try adding transition-duration to your CSS like this:
CSS:
.menu-animation-underline nav.main_menu>ul>li.active>a .menu-text:before{
  width: 0;
  transition-duration: 0.5s;  /*the 0.5s it the time it takes for the line to reach 100% and back*/
}

.menu-animation-underline nav.main_menu>ul>li:hover.active>a .menu-text:before{
  width: 100%;
  transition-duration: 0.5s;
}


I'm not too sure what you did here .menu-animation-underline nav.main_menu>ul>li.active>a .menu-text:before.
 

New Threads

Buy us a coffee!

Back
Top Bottom