[Dojo-interest] Set CSS class

Daniel daniel.carrera at zmsl.com
Sun Dec 16 23:05:11 UTC 2007


Thanks.

Sigh...  Some times IE makes me want to cry. I've been trying to get the 
stupid thing to work for hours. The IE debugger *says* that the object 
has the class "Foo", but visually it doesn't have any of the attributes 
of the class (background, text-alignment, box size) and the result is 
quite unusable (because the box is tiny and it's supposed to be big).

I don't know what to do anymore. IE only seems to read the CSS when it's 
not a class that was added later by me. And I really really can't 
refactor the CSS in a way that doesn't require assigning a class to the 
div in question.

I was hoping that Dojo's addClass function would work because Dojo 
widgets don't seem to have this problem. But it didn't help. :-(

I'll come back to this tomorrow.

Thanks for the help.

Daniel.


Dustin Machi wrote:
> http://redesign.dojotoolkit.org/?q=jsdoc/dojo/HEAD/object/dojo.addClass
> 
> Daniel wrote:
>> Hello,
>>
>> I'm having trouble with Internet Explorer. It doesn't like this construct:
>>
>> domObj.setAttribute("class", "Foo");
>>
>> I believe that there is a dojo method to assign a class to an DOM 
>> object, but I've been looking all over for it and can't find it. Could 
>> someone tell me how to assign a class to an object? On Google I found 
>> 'dojo.html.setClass' but apparently that doesn't exist anymore.
>>
>> Help.
>>
>> Daniel.
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://dojotoolkit.org/docs/book
>> Forums: http://dojotoolkit.org/forum
>> Dojo-interest at dojotoolkit.org
>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>
> 
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> 



More information about the Dojo-interest mailing list