I just now found that when I try to change background-color using YUI for a body it doesn’t work in FF5 and Opera but works in IE and Chrome. However, if I set color values for background it works in FF as well as Opera. I thought that background-color was just some sort of specialisation for background. Which one can be used safely across all browsers? Code in question can be seen here, background or background-color? Which one is safe to use?, I still have problem understanding how YUI handles events. I have also hosted the page with modified code here http://www.kumarchetan.com/yui-module.html, try accessing this page using IE, Chrome, FF and Opera and notice how smoothly the values change in different browsers.
I just now found that when I try to change background-color using YUI for
Share
To fix your problem, add this CSS:
The
htmlandbodydo not take up 100% height, which is what you need to handlemousemoveevents. Thebackgroundfor the root element is handled specially, but that’s not the same as having 100% height.The reason for the inconsistent behaviour between browsers is possibly to do with @BoltClock’s edit, and also probably to do with the fact that your page is using Quirks Mode, because you don’t have a doctype. Add this as the very first line: