Hi Jeff,

[EMAIL PROTECTED] wrote:
> Hi,
> 
> I'm having difficulty using Prototype's Insertion method to insert
> styles into a document node. Code like this seems to fail:
> 
> new Insertion.Top(widgets[i], '<style type="text/css"></style>');
> 
> When I inspect the DOM, the style is nowhere to be found.
> 
> Any ideas on how to get this to work? Thank you,

Although most browsers will accept CSS declarations inside <script></script> 
tags just about anywhere in a static HTML-soup document, they are only legal 
within the <head> of the document, not in the <body>, so the DOM rejects adding 
them dynamically there.

-dave
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to