WordPress.org

Ready to get started?Download WordPress

Forums

Styling hyperlinks on post area (3 posts)

  1. reesan
    Member
    Posted 5 years ago #

    I am trying to style the hyperlinks in the post area and am not having much luck.

    I added the following to my CSS file however it als affects the style of the hyperlinks in the header meta (like the author name link and comment link) and also the tag links at the bottom of the post.

    Is there a way that I can restrict the control of the style to just the body of the post?

    .postarea a:link, visited  {
            color: #0090fe;
            }
    
    .postarea a:hover, active  {
    	color: #FFFFFF;
    	background: #0090fe;
    	text-decoration: none;
    	}

    Note: I removed the above CSS due to undesirable results.

    PS: My site is http://www.loneleeplanet.com.

    All feedback appreciated.

  2. Steffen Jørgensen
    Member
    Posted 5 years ago #

    .postarea p a:link, visited  {
            color: #0090fe;
            }
    
    .postarea p a:hover, active  {
    	color: #FFFFFF;
    	background: #0090fe;
    	text-decoration: none;
    	}

    should do it...

  3. t31os
    Member
    Posted 5 years ago #

    It should actually be..

    .postarea a:link,
    .postarea a:visited  {
            color: #0090fe;
            }
    
    .postarea a:hover,
    .postarea a:active  {
    	color: #FFFFFF;
    	background: #0090fe;
    	text-decoration: none;
    	}

    active or visited on there own would point to tags... <visited> and <active> which don't exist.

    Usage of active, hover and visited is with a :

Topic Closed

This topic has been closed to new replies.

About this Topic