I'm surprised this isn't addressed in the Docs for CSS or in the FAQ. I think this page should say something about it: http://docs.jquery.com/CSS#css.28_properties_.29
Anyways, use textAlign and fontFamily. Same is true for any property with a hyphen in it. --Erik On 8/5/07, jayturley <[EMAIL PROTECTED]> wrote: > > > 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 > >