• Resolved Mistress Web

    (@mistress-web)


    Hello,

    I have some internal links on a page, but cannot get rid of the default underline. Browser is Chrome; working on a PC. I’ve tried (in custom css):
    /*–1st try–*/
    a {text-decoration: none;}

    /*–2nd try–*/
    a:link {
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    }
    a:active {
    text-decoration: none;
    }
    a:hover {
    text-decoration: none;
    }
    /*–3rd try–*/
    a {
    border-bottom: none;
    }
    /*–4th tries–*/
    tried various inline <style></style> solutions, and class=”intxt”, etc.

    The links I’m trying to affect are in a <p> on a page, not post or main nav. Cleared browser cache after each change.

    Cheers–Patricia

Viewing 9 replies - 1 through 9 (of 9 total)
  • You can try !important with your rules so that it looks like:

    a{text-decoration: none !important;}
    a:link{text-decoration: none !important;}
    a:hover{text-decoration: none !important;}
    a:visited{text-decoration: none !important;}

    Or you can write them all in one line like:
    a, a:link, a:visited, a:hover, a:active{text-decoration: none !important;}

    Hope this helps.

    Thread Starter Mistress Web

    (@mistress-web)

    Hi Subrataemfluence,

    Thanks for offering a solution, but that didn’t work either.

    Cheers–Patricia

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Thread Starter Mistress Web

    (@mistress-web)

    Hello, Andrew:

    Those selectors don’t work in my case probably because I’m not trying to affect post or main nav links, etc. I need inline stying?

    I need to change hyperlinks [href] in regular text on a page. How do you affect box shadow styling inline? border-bottom: none;.

    Here’s the page:
    Investment properties are my special expertise. Contact me now to discuss my current listings.

    Download my app <span style=”color: #3366ff;”>here</span>.

    I am a fully licensed realtor, working in affiliation with the premiere South Florida agency, Agent Plus Realty.com

    Cheers–Patricia

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you sure they don’t work? The selector below is for links inside standard page/ post content:

    
    .entry-content a
    
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    How do you affect box shadow styling inline? border-bottom: none;.

    You use box shadow of ‘none’:

    
    
    .entry-content a {
    	-webkit-box-shadow: none;
    	box-shadow: none;
    }
    
    
    Thread Starter Mistress Web

    (@mistress-web)

    Yes, that worked! Thank you, Andrew. I could SWEAR I tried that earlier during one of my many attempts, but apparently not. I’ll deal with the on-hover underline that remains.

    Happy New Year–Patricia

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Thanks Patricia, the hover can be removed in the same way. Try this code instead:

    
    .entry-content a,
    .entry-content a:hover {
    	-webkit-box-shadow: none;
    	box-shadow: none;
    }
    
    Thread Starter Mistress Web

    (@mistress-web)

    Hi Andrew,

    Wahoo! I’m grateful for the info, plus I learned how to style WP links. I didn’t apply the color correctly, but it’s working. Look how fancy I am now:
    /*–style links–*/
    /* unvisited link */
    .entry-content a,
    .entry-content a:link {
    text-decoration: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    }
    /* visited link */
    .entry-content a:visited {
    color: #3366ff;
    -webkit-box-shadow: none;
    box-shadow: none;
    }
    /* mouse over link */
    .entry-content a:hover {
    font-weight: bold;
    -webkit-box-shadow: none;
    box-shadow: none;
    }
    /* selected link */
    .entry-content a:active {
    font-weight: bold;
    -webkit-box-shadow: none;
    box-shadow: none;
    }
    Wahoo! Have a great day–Patricia

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove default link underline’ is closed to new replies.