[Resolved] Link background on hover

Home Forums Support [Resolved] Link background on hover

Home Forums Support Link background on hover

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2260609
    ammgbr

    Hello I am suing the following CSS for link background on hover:

    .entry-content a:hover{
    background-color: #3C4043;
    }

    It does not appear to work on desktop despite clearing server and CDN cache. On preview it works when on mobile version.

    Also, how could I have the background hover extend the full width of that line as opposed to just the link length?

    #2260651
    Fernando
    Customer Support

    Hello there,

    It seems that your CSS code has a syntax error which is why the code isn’t working. There’s a missing } Specifically this part:

    @media (max-width: 768px) {
        div#primary-menu {
            margin-top: 5px;
            border-top: 2px solid #5F6368;
            border-bottom: 2px solid #5F6368;
            width: 100%;
        }
        .entry-content a:hover {
            background-color: #3C4043;
        }

    Should it be something like this?

    @media (max-width: 768px) {
        div#primary-menu {
            margin-top: 5px;
            border-top: 2px solid #5F6368;
            border-bottom: 2px solid #5F6368;
            width: 100%;
        }
    }
        .entry-content a:hover {
            background-color: #3C4043;
        }

    Kindly let us know.

    #2262700
    ammgbr

    Thank you for spotting that, it now works!

    Is there a css modification to to have the hover effect over the entire length of the line and not just over the text?

    #2262738
    Ying
    Staff
    Customer Support

    The block you are using set the container to inline-block which will not go full width.

    This CSS should override the CSS from the block, give it a try:

    .gutentor-element-list ul:not(.list-indicator-image):not(.list-indicator-icon) li span {
        display: block;
    }
    .gutentor-element-list ul:not(.list-indicator-image):not(.list-indicator-icon) li span p {
        display: flex;
        flex-direction: column;
    }

    You’ll see gaps between lines, that’s the <br> elements.

    #2262754
    ammgbr

    Many thanks

    #2262761
    Ying
    Staff
    Customer Support

    No problem 🙂

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