Categories: Programming

CSS hover for all elements in IE

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.

Remiz

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

View Comments

Recent Posts

Apple push notification php example code 2021

For a long time since Push notification became a thing on iOS, it was very simple to integrate push notification…

8 months ago

Solved: MySQL convert_tz returns null on MacOS Catalina using XAMPP

Note: A little bit of a story since I haven't been writing for a while. If you are in a…

2 years ago

Why You Should Hire a Creative Marketing Agency for Your Next Campaign

There are few things that are quite as universally important in a business like marketing. Good marketing is at the…

2 years ago

Bring back PPTP VPN on iOS 10 and macOs sierra

Since latest iOS and macOs removed support for PPTP VPN from their built in client, here is how you can…

5 years ago

This will Change

Back to habits of young days. Shaping up another life. Starting like a kid who is a great king.

7 years ago

2013 – the fastest year ever !

Today, when I logged in to my pc & open Chrome, I saw this nice Google Doodle for New Year’s…

8 years ago