Tuesday, January 31, 2006

Prototype

Here's a little hint... If you're using Prototype in any of your projects and you want to set the "float" style you have to use the property cssFloat.

Bad:
Element.setStyle(mydiv, {float: 'left'});
GOOD:
Element.setStyle(mydiv, {cssFloat: 'left'});
I suppose this is probably true outside of prototype too..

The sticky wicket about this is that Safari seems to be the only browser that cares. Firefox and IE handle it just fine. Safari fails mysteriously.

No comments:

Post a Comment