Welcome to WebmasterWorld Guest from 54.160.131.144

Forum Moderators: not2easy

Message Too Old, No Replies

Highlight Active Input Field

Using just CSS?

     

limbo

9:57 am on Aug 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible?

I imagine IE6 has limited support for any kind of active property on input fields...

Cheers, Limbo.

trick

8:36 pm on Aug 5, 2009 (gmt 0)

5+ Year Member



google ("highlight active form field css") found this:

textarea:focus, input:focus {
border: 1px solid #900;
background-color: #FFFF9D;
}

how's that?

limbo

10:29 am on Aug 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Works great in most bit not IE6/7.

I'm guessing there is no support for background and border properties for the :focus selector.

Cheers

swa66

1:58 pm on Aug 6, 2009 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Legacy IE versions lack support for the :focus pseudo class entirely.

To add it, you can use javascript, e.g. IE8.js [code.google.com] will add the support you seek in IE6 and IE7.
Do take care with that script: it'll add support for lots of other things as well, so you might need to revisit more of your IE workarounds.

Alternatively a degraded solution for the obsolete browsers can also be considered. There's no rule that says the decade old browsers must render out sites exactly the same as the modern ones, is there?

limbo

7:46 am on Aug 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Indeed. There isn't Swa - and I don't intend to :)