• Hello,

    I’d like to add a ::after pseudoelement to make a border bottom animation. I can do this with no problem with a normal menu, but with this one. I add the after with css, but nothing happens. I’d like to know why and how can I solve this.

    This is the css I used.

    #mega-menu-primary li{
        position:relative;
    }
    
    #mega-menu-primary li::after {
        content: '';
        position: absolute;
        width: 0px;
        height: 3px;
        left: 50%;
        bottom: 0;
        background-color: #fdcf00;
        border-radius: 5px;
        transition: all ease-in-out .2s;
    }
    
    #mega-menu-primary li:hover::after {
        width: 100%;
        left: 0;
    }

    Thank you for your time.

Viewing 1 replies (of 1 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi dantemasamune,

    I think you will need to set “display: inline-block” on the ::after element, at the very least. And also make your selectors more specific, or use !important after your rules.

    Regards,
    Tom

Viewing 1 replies (of 1 total)
  • The topic ‘Issue with adding pseudo element to mega menu items.’ is closed to new replies.