Results 1 to 3 of 3

Thread: Way to add text on certain elements on action? [SOLVED]

  1. #1
    User
    Join Date
    10-15-10.
    Posts
    279

    Default Way to add text on certain elements on action? [SOLVED]

    Instead of just adjusting the color of text of the link of a news article that someone has already visited, (a:visited) I want it to add "Read:" at the beginning of the link of the news article. Simple way to do this?

  2. #2
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: Way to add text on certain elements on action?

    To add some text via CSS, you'd use the :before pseudo selector:
    http://www.quirksmode.org/css/beforeafter.html

    Code:
    a:visited:before { content: "Read: "; }
    Information on what browsers actually support it:
    http://www.quirksmode.org/css/contents.html
    Brian

  3. #3
    User
    Join Date
    10-15-10.
    Posts
    279

    Default Re: Way to add text on certain elements on action?

    Thank you so much. I'll keep a color change for visited for the older I.E. versions for a backup. That site is extremely useful as well. Didn't know there were so many different types of selectors that have special functions like that.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •