I currently have issues in Webkit(Safari and Chrome) were I try to load dynamically (innerHTML) some html into a div, the html contains css rules (...), after the html gets
meh. I don't have enough points to vote up Andrei Cimpoca's result, but that solution is the best one here.
style.innerHTML = "..."; does not work in webkit engines or ie.
To correctly inject css text, you must:
style.styleSheet.cssText = "..."; for ie.
and
style.appendChild(document.createTextNode("...")); for webkit.
Firefox will also work with the second option, or with style.innerHTML = "...";