Just Another Blog

Are you thinking what I'm thinking?

Friday, August 18, 2006

style.float?

Today I want to change the CSS float property of the inline style of an element programatically using style.float. I found that it has no effect. By alerting the innerHTML property, I found that the inline style is not set at all!

After googling, I found that since float is a reserved word in JavaScript/ECMAScript, one need to use style.cssFloat. And Internet Explorer, unsurprisingly, requires one to use style.styleFloat instead.

Anyway, problem solved. :-)

3 Comments:

Note that troll and spam comments will be deleted without any notification.

Post a Comment

<< Home