Forum Moderators: open
I had some problems before because I didnt set all the other outer cells to 0%. But now I did, you can still see that they are not collapsing right. The cells on the sides have collapsed, but not on the top and bottom. Am I missing something?
[edited by: engine at 10:37 am (utc) on Feb. 27, 2006]
[edit reason] See TOS [webmasterworld.com] [/edit]
Here is my table code.
<table width="387" height="153" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="0" height="0%" class="vbordertile"><div align="left">
<p class="hbordertile"> </p>
</div></td>
<td width="100%" height="0%" class="hBorderTileTop"> </td>
<td width="0" height="0%" class="hbordertile"><div align="right">
<p class="vbordertile"> </p>
</div></td>
</tr>
<tr>
<td width="0%" class="vBorderTileLeft"> </td>
<td width="100%" height="100%" align="center"><div align="center">
<p>This is the middle Cell.</p>
</div></td>
<td width="0" height="115" class="vBorderTileRight"> </td>
</tr>
<tr>
<td width="0" height="0" class="vbordertile"> </td>
<td width="100%" height="0" valign="bottom" class="hBorderTileTop"> </td>
<td width="0" height="0" class="hbordertile"> </td>
</tr>
</table>
And here is the css:
.vBorderTileRight {
background-image: url(/border_vside.gif);
background-repeat: repeat-y;
right: 10px;
background-position: right;
}
.vBorderTileLeft {
background-image: url(/border_vside.gif);
background-repeat: repeat-y;
right: 10px;
background-position: left;
}
.hBorderTileTop {
background-image: url(/border_hside.gif);
background-repeat: repeat-x;
background-position: top;
}
And here is the very top of the code:
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">";?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
But if now you take out the image and set the background of the cell to a image with a width of 300px the cell will not resize.
You either put actualy <img> elements in the cells or set the heights and widths accordingly to the cells. In your case i think the second aproach is the solution to what you want.