Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS: How to put a checkmark icon/acsii character next to all visited links?

Tags:

html

css

For any visited (a:visited) web page, I would like to display those links on my website with a small checkmark to the left of the link.

So for example:

"this is an unvisited link"

√ "this is a visited link"

Question: how do I accomplish the checkmark using CSS?

like image 525
Td. Avatar asked Feb 12 '10 05:02

Td.


People also ask

How do I insert a checkmark in HTML?

In the web page's HTML source code, add one of the following Unicode HTML entities, depending on the type of check mark you want to insert. ☑ - inserts the " ☑ " symbol. ✓ - adds the " ✓ " symbol. ✔ - inserts the " ✔ " symbol.


1 Answers

You can use a combination of background and padding to get this effect.

a:visited {
    background: transparent url("path/to/checkmark.png") left center no-repeat;
    padding-left: 10px;
}

Adjust the padding, and background position to fit your needs. Hope this helps.

like image 123
nickelleon Avatar answered Sep 21 '22 05:09

nickelleon