bg color of iFrame

liunx

Guest
Greetings,<br />
<br />
how do i change the background color of an iFrame?!<br />
<br />
here is my iFrame code:<br />
<br />
<iframe src=http://www.webdeveloper.com/forum/archive/index.php/"C:\Third_Party_Apps\MH PACS Web\message.txt" name="iframe" width="600" height="200" align="center" scrolling="yes" marginheight="0" marginwidth="0" frameborder="1"></iframe><br />
<br />
Thank you for your time,<br />
<br />
Nick<!--content-->Originally posted by nick1 <br />
<br />
<iframe src=http://www.webdeveloper.com/forum/archive/index.php/"C:\Third_Party_Apps\MH PACS Web\message.txt" name="iframe" width="600" height="200" align="center" scrolling="yes" marginheight="0" marginwidth="0" frameborder="1"></iframe><br />
<br />
<br />
<br />
I believe you would add style="background-color: #colour;" <br />
<br />
eg:<br />
<iframe src=http://www.webdeveloper.com/forum/archive/index.php/"C:\Third_Party_Apps\MH PACS Web\message.txt" name="iframe" width="600" height="200" align="center" scrolling="yes" marginheight="0" marginwidth="0" frameborder="1" style="background-color: #ffcccc;" ></iframe><!--content-->no no no...<br />
<br />
you should make it:<br />
<iframe source="message.html"...<br />
<br />
and then here is message.html:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><br />
<html><br />
<br />
<head><br />
<title>Message</title><br />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"><br />
<style type="text/css"><br />
body {<br />
background-color: blue; /*bg color*/<br />
}<br />
</style><br />
</head><br />
<br />
<body><br />
<p>Blah Blah Blah Blah</p><br />
</body><br />
<br />
</html><br />
<br />
However, I really think you should just not use an iframe. Frames are bad web design...<!--content-->I believe IFrames have nothing to do with Frames?<br />
<br />
Or am i wrong?<!--content-->an iframe is a square frame<!--content-->no, an iframe is a floating frame<!--content-->it does not matter it is still a frame with a page opening within it, thus making it inaccessable and a pain to work with! Also, how come that path is a local path?<br />
I would say if at all possible do not use an iframe, for the scrolling affect you could do this<br />
<div style="overflow:auto; width:600px; height:200px;">content will scroll when it is bigger then the div.</div><!--content-->
 
Back
Top