HTML Remix - Dont copy code, remix it!

February 13, 2009

CSS hover for all elements in IE

Posted by : Remiz
Filed under : CSS

Most of the new generation browsers support CSS pseudo class :hover to any elements. That is a nice feature because you can give mouseover effect for any element using CSS.

Example :

tr:hover td { background:#f2f2f2; }

But IE supports CSS hover for anchor tags only. So this wont work in IE. Now you can use the Microsoft’s propratory stuff, "behavior" Just add one line CSS to your main style file and put this csshover.htc file in same folder.

body { behavior: url("csshover.htc");}

Demo

You can see the demo here or download the source files

You can read the full desciprtion and get latest version of htc file here.


Incoming search terms:

css all elements, css hover all elements, css hover all, hover on all elements, all elements css, css all a hover, css all elements hover, hover all elements, csshover3 demo, hover more elements css

Remiz

Remixed version of unstable human emotions and thirst of mankind actions. UX designer, UI developer and HE of WebCastle Media Pvt LTD

Twitter - Facebook


One Response to “CSS hover for all elements in IE”

  1. Nice one… but bit buggy when combined with other JavaScript.

Leave a Reply

 

Subscribe via email

WebCastle

I’m promoting

Yellow Pages
Advertise here
More in CSS (4 of 6 articles)