|
|
#1 |
|
New Member
![]() |
hey everyone.
i have a table with 3 columns, 2 rows. now i want the 2 outer colums of the 1st row to have a set height (for a colour-flow-background) and the outer colums of the 2nd row to automatically adjust to the content height of the middle column/cell. here is the code: Code:
<table width="100%" style="height: 100%;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" height="465" background="layout/bg.gif"></td>
<td></td>
<td width="200" height="465" background="layout/bg.gif"></td>
</tr>
<tr>
<td width="200" bgcolor="#5D7B98"></td>
<td></td>
<td width="200" bgcolor="#5D7B98"></td>
</tr>
</table>
any simple suggestions? i tried embedding another table into the cell - then i tried the background:repeat tag and some other stuff - unsuccessful. please help! thx!
|
|
|
|
|
|
#2 |
|
Silver Member
![]() Join Date: Nov 2008
Location: New Mexico
Posts: 145
|
I think the issue lies in your height: 100%; setting for the tables overall style, but I'm not sure how that would affect the fixed height of an individual cell. Do you have an example page I can see?
EDIT: Also, try adding a div within the cell and putting the height/width settings on the div instead. See how that affects it.
__________________
|
|
|
|
|
|
#3 |
|
Super Noob
![]() |
Could you give a example link please. Would make understanding your intent much easier.
Basically, the first problem that I see is that the center column can't have a different height than the outer columns. They are on the same row and must have the same height. The only way to avoid this is to span the center column across two rows, which would keep the top outer columns at the set height, regardless of how much content is entered in the center column. Code:
<table width="100%" style="height: 100%;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" height="465" background="layout/bg.gif"></td>
<td rowspan="2">Content here.</td>
<td width="200" height="465" background="layout/bg.gif"></td>
</tr>
<tr>
<td width="200" bgcolor="#5D7B98"></td>
<td width="200" bgcolor="#5D7B98"></td>
</tr>
</table>
Last edited by zkiller; 11-18-2008 at 05:28 AM. |
|
|
|
|
|
#4 |
|
New Member
![]() |
hey again. thx for the reply!
@geodun: i have tried adding divs with heights to the cells before, but unfortunately that didnt help either... @zkiller: i thought that would have fixed the problem, but if you exceed the content height of 200px in your code, the first row Code:
<tr>
<td width="200" height="465" background="layout/bg.gif"></td>
<td></td>
<td width="200" height="465" background="layout/bg.gif"></td>
</tr>
Code:
<tr>
<td width="200" bgcolor="#5D7B98"></td>
<td width="200" bgcolor="#5D7B98"></td>
</tr>
like that:Code:
<table width="100%" style="height: 100%;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="43" height="200" background="layout/framelef.gif"></td>
<td width="47" height="200" background="layout/framerig.gif"></td>
</tr>
<tr>
<td width="43" background="layout/bglef.gif"></td>
<td rowspan="2"></td>
<td width="47" background="layout/bgrig.gif"></td>
</tr>
</table>
if you have a quicker and easier way to get the tablework done, so i can save it as a template and just work on the contentcell every time - i would send a turkey for thanksgiving ![]() i just tried to make a huge table with 10 rows and columns and work from the inside outwards, but no chance. at least for me. so yeah - im still stuck
|
|
|
|
|
|
#5 |
|
New Member
![]() |
hey guys. i found an easy solution. i just added another table in the cell. you then take a bg picture and set it for the table and then another bg picture for the cell. works great! thx anyway!
Last edited by jualgi; 11-18-2008 at 06:51 PM. |
|
|
|
|
|
#6 |
|
Bronze Member
![]() Join Date: Sep 2008
Posts: 25
|
NO Tabels! ahh unless its for a chart then by all means go ahead
|
|
|
|
|
|
#7 |
|
Super Noob
![]() |
I haven't used tables in ages, so I tested it to ensure I am not losing my mind. This works...
Code:
<table width="100%" height="100%" border="0">
<tr>
<td width="200" height="465" bgcolor="#FF0000"> </td>
<td height="465" rowspan="2" valign="top"> </td>
<td width="200" height="465" bgcolor="#FF0000"> </td>
</tr>
<tr>
<td width="200" bgcolor="#00FFFF"> </td>
<td width="200" bgcolor="#00FFFF"> </td>
</tr>
</table>
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|