By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,722 Members | 1,354 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,722 IT Pros & Developers. It's quick & easy.

TABLE column width problems

P: n/a
I am creating a table and inserting an iframe inside a cell for which
the width depends on the screen size.
The table has 7 columns and the fourth column is resized depeding on the
screen size... here is my complete definition.

<table style="HEIGHT: 472px" cellSpacing="0" cellPadding="0" width="100%"
border="0">
<tr height="1">
<td width="10"></td>
<td width="178"></td>
<td width="16"></td>
<td width="14"></td>
<td></td>
<td width="10"></td>
<td width="11"></td>
</tr>
<tr height="10">
<td width="218" background="Border1.gif" colSpan="4" </td>
<td background="Border2.gif"></td>
<td width="21" background="Border3.gif" colSpan="2"></td>
</tr>
<tr height="16">
<td width="10" background="Border4.gif"></td>
<td width="178" rowSpan="2"></td>
<td width="16" background="Border5.gif"></td>
<td bgColor="white" colSpan="3" rowSpan="2">INSERT POINT</td>
<td width="11" background="images/Border6.gif"></td>
</tr>
<tr>
<td width="10" background="Border4.gif"></td>
<td width="16" background="Border7.gif"></td>
<td width="11" background="Border8.gif"></td>
</tr>
<tr height="25">
<td width="218" background="Border9.gif" colSpan="4"></td>
<td background="Border11.gif"></td>
<td width="21" background="Border12.gif" colSpan="2"></td>
</tr>
</table>

The table works exactly the way I intend it to. Te variable size cell has
a rowspan=2... However, if I replace the text INSERT POINT above with an
IFRAME (or any control for that matter) the columns change their widths.

Any help would be apprecieated.

Jeronimo
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Don't forget to try to force the table cell widths. Setting a background gif
doesn't actually do this and the table cell will still try to collapse (not
to mention a background for a table cell isn't supported in all browsers.
You're better off actually making the backgrounds as actual images in the
table cell and setting the widths specifically on both the cell and the
image. That may have a better result as the browser won't attempt to
collapse all the cells since they have an image inside them. Otherwise,
they're just another attribute of the table cell and don't necessarily force
the cell open.

Hope tihs helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Jeronimo Bertran" <je******@bertran.com> wrote in message
news:Xn********************************@207.46.248 .16...
I am creating a table and inserting an iframe inside a cell for which
the width depends on the screen size.
The table has 7 columns and the fourth column is resized depeding on the
screen size... here is my complete definition.

<table style="HEIGHT: 472px" cellSpacing="0" cellPadding="0" width="100%"
border="0">
<tr height="1">
<td width="10"></td>
<td width="178"></td>
<td width="16"></td>
<td width="14"></td>
<td></td>
<td width="10"></td>
<td width="11"></td>
</tr>
<tr height="10">
<td width="218" background="Border1.gif" colSpan="4" </td>
<td background="Border2.gif"></td>
<td width="21" background="Border3.gif" colSpan="2"></td>
</tr>
<tr height="16">
<td width="10" background="Border4.gif"></td>
<td width="178" rowSpan="2"></td>
<td width="16" background="Border5.gif"></td>
<td bgColor="white" colSpan="3" rowSpan="2">INSERT POINT</td>
<td width="11" background="images/Border6.gif"></td>
</tr>
<tr>
<td width="10" background="Border4.gif"></td>
<td width="16" background="Border7.gif"></td>
<td width="11" background="Border8.gif"></td>
</tr>
<tr height="25">
<td width="218" background="Border9.gif" colSpan="4"></td>
<td background="Border11.gif"></td>
<td width="21" background="Border12.gif" colSpan="2"></td>
</tr>
</table>

The table works exactly the way I intend it to. Te variable size cell has
a rowspan=2... However, if I replace the text INSERT POINT above with an
IFRAME (or any control for that matter) the columns change their widths.

Any help would be apprecieated.

Jeronimo

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.