TABLE column width problems

  • Thread starter Jeronimo Bertran
  • Start date
J

Jeronimo Bertran

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
 
M

Mark Fitzpatrick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top