[jQuery] problems with .css()

[jQuery] problems with .css()


I am having a bit of a problem with this function.
The code I have is:
$('.aDiv').css({ float: 'left', border: '1px dashed #ccc', margin:
'1px', padding: '10px' });
If I try to add any css property with a hyphen in it, such as text-
align or font-family,
$('.aDiv').width(40).height(40).css({ text-align: 'center', float:
'left', border: '1px dashed #ccc', margin: '1px', padding: '10px' });
it generates a error:
missing : before property id
Any ideas on how I can work around this?
Thanks!
-Jay