I am using an Iframe to include an html file that changes about 5 times a day. The background color is not white which causes a problem with IE because IE puts a white box around my Iframe. Firefox and Safari don't and since more people seem to use IE I need to make it work for IE.
I want to read the CSS background-color for the Iframe so I can dynamically change the body background color for the Iframe file. This file can be used in 30+ pages that have different background colors containing the Iframe.
This is the code around the Iframe:
I have seen lots of code to change the background color, but I haven't found any to determine the background color of the class: classswithbackg roundcolor especially since we're dealing with a parent.
The CSS:
For index1.htm:
For index2.htm:
I want to read the CSS background-color for the Iframe so I can dynamically change the body background color for the Iframe file. This file can be used in 30+ pages that have different background colors containing the Iframe.
This is the code around the Iframe:
Code:
<td align="center" valign="top" class="classswithbackgroundcolor">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr id="iframeid">
<td width="100%" valign="top" align="center">
<iframe name="I1" src="http://domain.com/fileusedbymanypages.htm" frameborder="0" style="height: 100%" width="100%" border="0"></iframe>
</td>
</tr>
</table>
</td>
The CSS:
For index1.htm:
Code:
.classswithbackgroundcolor{
background-color:#bbbbbb;
}
Code:
.classswithbackgroundcolor{
background-color:#d5d5d5;
}
Comment