来源:http://www.experts-exchange.com/Software/Internet_Email/Web_Browsers/Q_27288784.html
IE9 hover image not working for DIV
We have the following
1) an HTML file
2) a CSS file
3) two image files, one blueish, one orangeish. See attached code.
Works in every browser except IE9
What on EARTH is going ON?
1) an HTML file
2) a CSS file
3) two image files, one blueish, one orangeish. See attached code.
Works in every browser except IE9
What on EARTH is going ON?
Jump to Answer
ID: 27288784Comments
Accepted Solution
Never mind, peeps. I found that adding a <!DOCTYPE tag to the top of the page solved the problem. It doesn't even matter which one you add; you could add this one:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html 4/loose.dt d">
or this one:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html 4/strict.d td">
It both works.
[shrug]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html
or this one:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html
It both works.
[shrug]
by: WernerVonBraun on 2011-09-02 at 06:41:58ID: 36473332