Height of a table cell

liunx

Guest
I have this code here<br />
<br />
<html><br />
<head><br />
<title>Table</title><br />
</head><br />
<br />
<body><br />
<table border="1" width="760"><br />
<tr><br />
<td colspan="3">Cell 1</td><br />
</tr><br />
<tr><br />
<td rowspan="2" width="201"><br />
<h1>Cell 2</h1><br />
<p><br />
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam<br />
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.<br />
</p><br />
<p><br />
Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper<br />
suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure.<br />
</p><br />
<p>Bob</p><br />
</td><br />
<td colspan="2" height="74">Cell 3</td><br />
</tr><br />
<tr><br />
<td width="415">Cell 4</td><br />
<td width="144">Cell 5</td><br />
</tr><br />
<tr><br />
<td colspan="3">Cell 6</td><br />
</tr><br />
</table><br />
</body><br />
</html><br />
<br />
<br />
The problem is even if I put a height value to the Cell 3, it just won't apply it. I would like it to stick to the size specify and have Cell 4 and 5 to resize it's height automaticly as the text in Cell 2 grow or shrink. Is it possible or am I still thinking of something not possible ;)<!--content-->So do you not want the words to wrap when the page is resized?<!--content-->No, I would like the height of Cell 3 to be fix at 74px no matter how many text there is in Cell 2.<!--content--><td colspan="2" height="74" nowrap>Cell 3</td> will make it so the text doesn't change lines when the page is resized. Which results in the height of the cell not changing.<!--content-->This will have no effect. The problem is that Cell 3 is already too big (already over 74px) when you render the page in a browser.<br />
<br />
<br />
Here's a link that contain the same code as above<br />
<!-- m --><a class="postlink" href="http://www.wolfmahheaven.net/zzz4.htm">http://www.wolfmahheaven.net/zzz4.htm</a><!-- m --><!--content-->You need to change the width of the cell/table so it doesn't do that. Or change the font around, but I think you need to change the width.<!--content-->In short it cannot be done.<br />
<br />
The table, tr, td attributes are more of a guideline for the browser to render the overall table.<br />
<br />
If a td cell has too much data in it... it will accomadate the data by making it larger. I would suggest to get around this that you use a DIV tag inside the TD and fix its size will some CSS.<br />
<br />
Rememver to have no whitespace inside the TD's or it will force the cell to enlarge again around the DIV.<!--content-->
 
Back
Top