We help IT Professionals succeed at work.
Get Started

Question about auto expand height with table

PeterdeB
PeterdeB asked
on
316 Views
Last Modified: 2012-06-27
Hi all

I need to create a table like the attached code and image, the yellow part will contain content that can get lengthy, the 4 green blocks should remain 85px at all cost, is this possible using tables?

Reason i am asking this, is because of a site layout change, which can now contain up to 4 content blocks in the green part, but as the yellow part gets fuller, the green parts automatically expand and move down which is not what i want, they should not move and they should remain 85px as hieght each

Thanks
<html>
<head>
<style type = text/css>
.red {
	background-color: #F00;
}
.green {
	background: #0C6;
}
.yellow {
	background: #FF0;
}
-->
</style>
</head>
<body>
<table border="1" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="215" colspan="5" valign="top" class="red">&nbsp;</td>
  </tr>
  <tr>
    <td width="20" height="85" valign="top"></td>
    <td width="630" height="85" valign="top" class="yellow">&nbsp;</td>
    <td width="20" height="85" valign="top"></td>
    <td width="253" height="85" valign="top" class="green">&nbsp;</td>
    <td width="17" height="85" valign="top"></td>
  </tr>
  <tr>
    <td width="20" height="85" valign="top"></td>
    <td width="630" height="300" rowspan="3" valign="top" class="yellow">&nbsp;</td>
    <td width="20" height="85" valign="top"></td>
    <td width="253" height="85" valign="top" class="green">&nbsp;</td>
    <td width="17" height="85" valign="top"></td>
  </tr>
  <tr>
    <td width="20" height="83" valign="top"></td>
    <td width="20" height="83" valign="top"></td>
    <td width="253" height="83" valign="top" class="green">&nbsp;</td>
    <td width="17" height="83" valign="top"></td>
  </tr>
   <tr>
    <td width="20" height="83" valign="top"></td>
    <td width="20" height="83" valign="top"></td>
    <td width="253" height="83" valign="top" class="green">&nbsp;</td>
    <td width="17" height="83" valign="top"></td>
  </tr>
</table>
</body>
</html>

Open in new window

img.jpg
Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE