On Aug 5, 2007, at 4:08 PM, oliver wrote:

When using CSS properties with hyphens, you must convert them to
camelCase, e.g, "textAlign".

This is not true. If you want to use hyphenated CSS properties, all you have to do is wrap them in quotation marks.

This won't work:
$('.aDiv').css({float: 'left', text-align: 'center'});

This will work:
$('.aDiv').css({float: 'left', 'text-align': 'center'});


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




Reply via email to