I am using a phpbb3 forum with a bbcode to insert an iframe. I want to use the css from the forum for the iframe. I tried some code I found here but it isn't working. I might be doing something wrong but I'd love to get this working, especially since users can change the forum css. The forum is: botdls.prophbb.com and the iframe is the "shoutbox" at the top. Thanks. Here is the code I used from this site which I found from google.
var cssLink = document.createElement("link") 
            cssLink.href = "pFstylesEditor.css"; 
            cssLink .rel = "stylesheet"; 
            cssLink .type = "text/css"; 
            //Instead of this
            //frames['frame1'].document.body.appendChild(cssLink);
            //Do this
            var doc=document.getElementById("edit").contentWindow.document 
            ///If you are doing any dynamic writing do that first
            doc.open;
            doc.write(myData);
            doc.close();
            //Then append child
            doc.body.appendChild(cssLink);