Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS CSS – change Text/background color with onclick!!!

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32010
    sia
    Member

    Hello friends, I want to know, if it’s possible to change the color(Text/background color) of a certain class of text when you click a link “without JavaScript”.
    If “YES”, How?

    #55558
    sia
    Member

    Hi Fourize,
    very cool,,,, thanks :-)

    but can I make it purely with CSS and work on FF and IE?

    #55559
    sliver37
    Member

    Depending on your actual needs, you can use the CSS pseudo class active to simulate “onclick”.



    a {color: red}
    a:active {color: blue} /* When clicked (or clicked and held) the color will be blue */

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.