Click to See Complete Forum and Search --> : HTML Tables Question


buffbiff
02-17-2006, 02:18 PM
I have a HTML Tables question.

When I type in a huge amount of text in one cell (Cell A), the cell next to it (Cell B) expands horizontally as well. I want Cell B to stay its original size. How can I get it to where Cell A on the right does not affect Cell B on the left? I am thinking CSS, but would like to do it in HTML if possible.

Thanks for your help.

Take care,

TheBearMay
02-17-2006, 03:01 PM
...
<td>some large volume of text</td><td style="width:20px">fixed width cell</td>
...

buffbiff
02-20-2006, 10:58 AM
TheBearMay - Thank you for the advise. I tried it and cell B still expands with the addition of text in Cell A.

Here is the code for the table row that I am having trouble with.

<tr>
<td style="width=:406px" rowspan="2" background="images/web_r2_c1.jpg" width="406" height="155" border="0" valign="top">
<div id="testBanner"><font size="4" face="Arial, Helvetica, sans-serif">"Unmatched Client Service."</font></div>
</td>

<td rowspan="3" background="images/web_r2_c2.jpg" valign="top"></td>
<td background="images/web_r2_c3.jpg" valign="top"><p><strong><font size="4" face="Arial, Helvetica, sans-serif">A History of Success</font></strong>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="2" face="Arial, Helvetica, sans-serif">"afasasfsafasf
asfasdfasfasdfasasfasfasdfffffffssafasfsafsafasfasfas
fsafsadf
adsfasfasfasfsadfsafasfasfasfasdfasfsadfasdfsdafsdafasdfsa
dfasdf
asfasfasfasfsafsafsafasfsafasfasfasfsadfsafsad
asfasfasfasfsafsadfsafsafasfsafsafsafsdaasfassfas
fsadfsadafas
fassadfsfsafsdfsadf
adfasfasdfasfasfsadf
asdfasdffasfasfsadfs asdfasfasfasfasfasfasfasfasf</font></p>
<p>&nbsp; </p></td>

<td rowspan="3"><img name="web_r2_c4" src="images/web_r2_c4.jpg" width="28" height="298" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="117" border="0" alt=""></td>
</tr>

Any other thoughts?

ray326
02-20-2006, 02:09 PM
I'm thinking that isn't tabular data in that table so the whole thing should be done with CSS layout instead.

the tree
02-20-2006, 02:17 PM
Here's a novel idea, use HTML properly and forget tables for layout.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Something</title>
<style type="text/css">
<!--
div#nil{
clear: both;
font: 14px arial;
}
q{
quotes: none;
}
div#uno{
width: 15em;
float: left;
}
div#dos{
width: 30em;
float: left;
}
-->
</style>
</head>
<body>
<div id="nil">
<div id="uno"><q>"Unmatched Client Service."</q></div>
<div id="dos"><h2>A History of Success</h2>
<p>One evening fair I took the air
Down by Blackwaterside
'Twas gazing all around me
When the Irish lad I spied
</p>
<p>All through the first part of that night
We did lie in sport and play,
When this young man arose and he gathered his clothes,
Saying, ``Fare thee well today''.</p>

<p>That's not the promise that you gave to me
When the first you lay on my breast,
You could make me believe with your lying tongue
That the sun rose in the west.</p>

<p>Go home, go home, to your father's garden
Go home and weep your fill,
And think upon your own misfortune
Which you bought with your wanton will.</p>

<p>There's not one girl in this whole town
As easily led as I,
And when the sky does fall and the seas will run dry,
Why, it's then you'll marry I.</p>
</div>
</div>
</body>
</html>