[Resolved] Link color on specific page

Home Forums Support [Resolved] Link color on specific page

Home Forums Support Link color on specific page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #783930
    finansdoktorn

    Hi,

    Is there a good way to change color and decoration of links so it only targets the links on a post/page.
    I have tried adding following css:

    .entry-content a {
    	text-decoration: underline;
    	color: #bc2020 !important;
    }

    This obviously changes all the links in entry-content areas. I dont want to change the links on example /blogg/.
    I also dont want to change the author name, date, category, tags etc links.

    I have deactivated cache plugins.

    Cheers

    #784165
    Leo
    Staff
    Customer Support

    Hi there,

    You can try something like this:

    body.single .entry-content a,
    body.page .entry-content a {
    	text-decoration: underline;
    	color: #bc2020 !important;
    }

    If you use browser inspect, each post type (page and post etc) would have unique class in the <body> tag.

    #784883
    finansdoktorn

    Perfect!

    #784894
    Leo
    Staff
    Customer Support

    Awesome 🙂

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