For this post, I'm not interested in cross-browser, etc. This relates to IE only (even just IE6 if needed).
I really need to have the contents of an iframe centered within a table cell. At this point, I don't care too much about the width/height of the iframe -- probably just 100% W/H of the table cell.
I just need the contents of the source (src) to be centered within the table cell. Is this possible!? I've searched both the CF and WA forums. I don't think I've ever seen it done.
Okay, this is what I have so far (as an example). When you use the iframe, the eBay logo (see bottom of post) is placed in the upper left corner of the bottom table row's cell. I need it in the middle/center of that cell...like the text in the code.
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="100%" height="22%" valign="middle" align="center">
<div align="center">
<center>
<table border="0" cellpadding="4" cellspacing="0" width="100%" height="100%">
<tr>
<td bgcolor="#FF0000">
Top row
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="100%" height="78%" valign="middle" align="center">
This text is centered vertically and horizontally in this table row's cell. Can this be done with the contents of an iframe source?
</td>
</tr>
</table>
Now, substitute the iframe tag below for the "This text is centered..." text. See the difference!?
<iframe id="datamain" name="centerofpage" style="width:100%; height:100%;" src="http://pics.ebay.com/aw/pics/navbar/ebay_logo_home.gif" marginwidth="5" marginheight="5" hspace="0" vspace="0" border="0" frameborder="0" scrolling="auto"></iframe>
I really need to have the contents of an iframe centered within a table cell. At this point, I don't care too much about the width/height of the iframe -- probably just 100% W/H of the table cell.
I just need the contents of the source (src) to be centered within the table cell. Is this possible!? I've searched both the CF and WA forums. I don't think I've ever seen it done.
Okay, this is what I have so far (as an example). When you use the iframe, the eBay logo (see bottom of post) is placed in the upper left corner of the bottom table row's cell. I need it in the middle/center of that cell...like the text in the code.
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td width="100%" height="22%" valign="middle" align="center">
<div align="center">
<center>
<table border="0" cellpadding="4" cellspacing="0" width="100%" height="100%">
<tr>
<td bgcolor="#FF0000">
Top row
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="100%" height="78%" valign="middle" align="center">
This text is centered vertically and horizontally in this table row's cell. Can this be done with the contents of an iframe source?
</td>
</tr>
</table>
Now, substitute the iframe tag below for the "This text is centered..." text. See the difference!?
<iframe id="datamain" name="centerofpage" style="width:100%; height:100%;" src="http://pics.ebay.com/aw/pics/navbar/ebay_logo_home.gif" marginwidth="5" marginheight="5" hspace="0" vspace="0" border="0" frameborder="0" scrolling="auto"></iframe>
Comment