Welcome to WebmasterWorld Guest from 54.159.42.234

Forum Moderators: not2easy

Message Too Old, No Replies

Highlight Active Input Field

Using just CSS?

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2002
posts:2204
votes: 0


Is it possible?

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

Cheers, Limbo.

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

New User

5+ Year Member

joined:Dec 12, 2007
posts:26
votes: 0


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

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

how's that?

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2002
posts:2204
votes: 0


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

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

Senior Member

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

joined:Aug 7, 2003
posts:4783
votes: 0


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?

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2002
posts:2204
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members