[thelist] CSS and iframes

Tom Dell'Aringa pixelmech at yahoo.com
Mon Jun 24 18:02:03 CDT 2002

Dan, try this:

File #1 (foo1.html)
function s(){
   document.frames[0].document.getElementById("foopie").style.fontSize = "10px";
Iframe below!<br />
<iframe name="foo" id="foo" src="foo2.html" width="450"></iframe><br />
<input type="button" onclick="s();" value="click">

iframe file (foo2.html)
<link rel="stylesheet" type="text/css" href="foo.css">
<p class="goo" id="foopie">Hi, I am Iframe content</p>

css file: (foo.css)
.goo {font-family: verdana; font-size: 18px;}

Click the button to change the font size in the iframe. Granted, not a great example and poor
code, but it should give you some ideas...


--- Daniel Fascia <danfascia at totalise.co.uk> wrote:
> >I'm not sure exactly what you want to do, but certainly the contents of the Iframe are
> styleable,
> >do you not want to do it that way? (or is it dynamic?)
> I want to load a stylesheet into the iframes document at runtime so that different ones could be
> loaded in on the users request..
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !

var me = tom.pixelmech.webDeveloper();

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup

More information about the thelist mailing list