[Resolved] :after not working

Home Forums Support [Resolved] :after not working

Home Forums Support :after not working

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2273304
    iamarghya

    So in the right sidebar, I have set the latest post widget and I wanted to animate it with a slide color when someone hovers it so I tried to add a :after code in the list element ‘li’ but it didn’t work, can u plz check for me?

    #2273306
    Fernando
    Customer Support

    Hi Iamarghya,

    Here’s a CSS you may try:

    ul.wp-block-latest-posts__list.wp-block-latest-posts li:hover:after {
        z-index: 1;
        width: 100%;
    }

    Hope this helps!

    #2273308
    iamarghya

    I tried it but it is going over the text but the same code is used on my other site and working perfectly…
    Check and see that when hover it is over the text for z-index I think.

    #2273309
    Fernando
    Customer Support

    I see.

    Try adding this:

    ul.wp-block-latest-posts__list.wp-block-latest-posts li a.wp-block-latest-posts__post-title {
        position: relative;
        z-index: 2;
    }

    This should put the text above the gradient.

    #2273311
    iamarghya

    Perfect Thanks🤗🥰

    #2273315
    Fernando
    Customer Support

    You’re welcome! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.