Programming i html: Combine a:visited with a:after, or chaining pseudo-classes w/psuedo-elements on newest questions tagged html – Stack Overflow

Let’s say I wanted to add a shape (like a checkmark) next to a link after it has been visited, instead of having it just turn purple, using a:after along with a:visited.

I’m unsure if I should select the shape like this:

a:visited:after {

or like this:

a:visited a:after

or

a:visited :after {

(i’m also a bit fuzzy on when I should or shouldn’t add a space before a pseudo-element, or does it even matter?)

or perhaps something different?

Right now my css looks like this:

a:visited:after {
    /* check mark shape */
    content:'0a0';
    color: black;
    position: relative;
    left:15px;
    display:inline-block;
    width: 3px;
    height: 6px;
    border: solid black;
    border-width: 0 2px 2px 0;  
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -o-transform: rotate(45deg);
}

check mark shape code from
http://webitect.net/design/webdesign/creating-fancy-bullet-points-with-pure-css3/

Thanks for any help.

See Answers


source: http://stackoverflow.com/questions/12342516/combine-avisited-with-aafter-or-chaining-pseudo-classes-w-psuedo-elements
Programming i html: programming-i-html



online applications demo