Forums

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

Home Forums CSS Add a Class with onFocus

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33636

    How can a class be applied/changed on a form using onfocus?

    Something like:

      

    Thank you,
    Charlie

    #83960
    chrisburton
    Participant

    Why not this?

    input:focus { }
    #83961

    Yes. Why not.
    Why make something complicated?

    #83962
    chrisburton
    Participant

    I’m not understanding your question

    #84014
    furrball1383
    Member

    I believe he doesn’t know how to target the same input element and change its class on focus

    #84025

    It was a rhetorical question.
    I didn’t think about the simple solution of using :focus in css.

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