471,627 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

Expandig DIV or TD

1
Hi

My problem seems simple but I search for hours and cannot find the solution.

Problem when I use a table:

I have 3 cells. Top left a fix corner image. Left should be an expanding TD. On the right a TD with variable content (I do not know the length).

A CCCCC
B CCCCC
B CCCCC

the code I use
<table border=1 cellpadding=0 cellspacing=0>
<tr>
<td height="22"><img src="images/treeLT.gif" /></td>
<td rowspan="10"><p>c</p><p>c</p><p>c</p></td>
</tr>
<tr>
<td background="images/treeLL.gif" height="100%"><img src="images/treeLL.gif" /></td>
</tr>
</table>

The proplem is, that the height of A is expanding as well and does not keep its height.

I tried with CSS and DIV the same

<div style="border:1px solid red; width:500px;">
<div style="float:left; height:100%; border:1px solid yellow;">
<div><img src="images/treeLT.gif" /></div>
<div id='EXPAND' style="background-image:url('images/treeLL.gif'); height:100%; width:22px; border:1px solid blue;"><img src="images/treeLL.gif" border=1 /></div>
</div>
<div style="float:left">
<p>c</p>
<p>c</p>
<p>c</p>
</div>
</div>

The problem here, the div EXPAND (I put the id just to explain) keeps the heigth of 1 pixel (size of image). How can I make that EXPAND expands to the height of the content div.

Any ideas

Thanks
Aug 21 '07 #1
0 1071

Post your reply

Sign in to post your reply or Sign up for a free account.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.