Highlighting form input fields

Discussion in 'HTML' started by Joshua Beall, Apr 6, 2005.

  1. Joshua Beall

    Joshua Beall Guest

    Joshua Beall, Apr 6, 2005
    #1
    1. Advertising

  2. "Joshua Beall" <> wrote in message
    news:r7W4e.39$H_5.9@trnddc01...
    > Hi All,
    >
    > I've seen on various sites how you can adjust the coloring of form input
    > fields (particularly, text inputs and textareas). Here's an example:
    >
    > http://tinyurl.com/4o8bw
    >
    > http://www.macromedia.com/cfusion/m.../cfusion/webforums/forum/index.cfm?forumid=15
    >
    > Move the focus to one of the fields and you will see that the background
    > color changes.
    >
    > How do I do this? Is it possible to do without JS? I've been picking
    > through the source and can't seem to isolate it, JS or otherwise. Any
    > tips?



    you can use CSS to do this alas, it only works in better browsers such as
    Firefox, Opera et al.

    input[type="text"]:focus, textarea:focus{
    background: #FFF;
    border-color: #0F0;
    }

    By using input[type="text"]:focus as opposed to just input:focus it stops
    the submit button's appearance from changing, which can look pretty crap.

    You can probably use JS for this as well or Dean Edward's IE7
    http://dean.edwards.name/IE7/

    Phil
    Phil Thompson, Apr 8, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xavier Bourguignon

    input text highlighting problem

    Xavier Bourguignon, Oct 29, 2003, in forum: HTML
    Replies:
    7
    Views:
    951
  2. Jessica Weiner
    Replies:
    2
    Views:
    395
  3. gotcha
    Replies:
    0
    Views:
    194
    gotcha
    Oct 24, 2003
  4. James Black
    Replies:
    2
    Views:
    116
    James Black
    Jul 26, 2007
  5. Replies:
    23
    Views:
    452
    Tim Streater
    Dec 18, 2013
Loading...

Share This Page