Erik is correct, but I would also add that it only when you do
css({fontWeight:'bold',textAlign:'left'}) but not when you do
css('font-weight','bold')On 8/5/07, Erik Beeson <[EMAIL PROTECTED]> wrote: > > 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 > > > > > -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com

