0

I have a link with the following format:

        a:link
    {
        color: #034af3;
        }

    a:editedLink
{
    color: #FFFFFF;
}

along with the above I want to have a link with the following and I want to use both of them in my page depending upon my requirement. How can I do the above?

3 Answers 3

2

Your question is not clear.

There are some pseudo classes in css for links

they are

a:link {color:#FF0000;}      /* unvisited link */
a:visited {color:#00FF00;}  /* visited link */
a:hover {color:#FF00FF;}  /* mouse over link */
a:active {color:#0000FF;}  /* selected link */

Pseudo-classes can be combined with CSS classes like

a.red:visited {color:#FF0000;}
<a class="red" href="css_syntax.asp">CSS Syntax</a>

If this is not you want ,pls explain a bit further

Sign up to request clarification or add additional context in comments.

Comments

1

You can't set :whateverYouLike.

:link, :visited, :hover, :active ar reserved css pseudo classes/selectors.

If you want your own styling, use css classes. Like:

<a href="#" class="editedLink">LinkText</a>

plus css definition:

.editedLink {color:#FFF;}

Comments

0
a:link, a:visited, a:hover, a:active{
    color: #034af3;
}

a.editedLink{
    color: #FFFFFF;
}

<a href="/link" class="editedLink">Text</a>
<a href="/link">Text</a>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.