I’m creating a new window using javascript (w/ jQuery), and I add some nodes to the body of the new window using code like this:
var consoleWindow = window.open('','','width=460,height=345');
$(consoleWindow.document).find('body').append($("#debug_console"));
The problem is that I naively assumed the CSS rules for the parent window would apply to the nodes in the child window, instead I get unformatted HTML. How would I apply CSS in the new window? Thanks for your help.
Just use something like this
but you have to point the link href to your CSS file.