I tried this out in jsfiddle and it did work in Chrome - but I'm not sure
if all browsers will update the styles on the page if the <style> tag is
changed - though - they might cache the style references

but you can also access all of the style tags on the page using $$('style')

Jason Westbrook | T: 313-799-3770 | [email protected]



On Fri, Nov 16, 2012 at 10:12 AM, kstubs <[email protected]> wrote:

> What is the safe way to access the style element, or the head element for
> the document and then to append CSS?
>
> I'm doing:
> document.head.down('style').insert(some_style);
>
> Safe (cross-browser)?  Or not?
> Karl..
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/prototype-scriptaculous/-/SsjKLOTGjAsJ.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to