[Support request] Style links

Home Forums Support [Support request] Style links

Home Forums Support Style links

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1494876
    gabrielvb1100

    Hello, I want to style links , but only the links that appear in posts or pages and not links in titles like h2, h3
    I am currently using :
    .entry-content a:link {
    color: #000000 !important;
    font-weight:bold !important;
    background-color: #ffe7e7 !important;
    }

    but that style links in my homepage where some links are h2, is there a way to avoid this?

    #1494891
    Elvin
    Staff
    Customer Support

    Hi,

    You can exempt links from your CSS by adding the :not() pseudo-class.

    Example 1: “Excluding h2 and h3”

    .entry-content a:not(h2):not(h3) {
    color: #000000 !important;
    font-weight:bold !important;
    background-color: #ffe7e7 !important;
    }

    Example 2: “Excluding entry-title class”

    .entry-content a:not(.entry-title) {
    color: #000000 !important;
    font-weight:bold !important;
    background-color: #ffe7e7 !important;
    }
    #1494909
    gabrielvb1100

    Thanks, that did the trick

    #1494911
    Elvin
    Staff
    Customer Support

    No problem. 🙂

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