Setting cell width without specifying it

Setting cell width without specifying it

am 04.06.2007 23:53:44 von laredotornado

Hi,

I have a table of two rows. The first row contains a single cell with
an image. The second row contains a cell with a smaller table,
containing an image and text on the same row. My problem is, I want
the width of the whole table to be the width of the image in the first
row. However, I don't want to hard code this width because it might
change. But right now, the second row's width is expanding to fill
the entire browser screen. Can I restrict the second row's width to
be the first row's width without hard-coding a pixel size?

Here's the code:




The Americas src="images/coffeetheamerica.jpg" border="0">

border="0">




valign="top" bgcolor="cccc99">

src="images/womanprocessing.jpg" width="200" height="121">

valign="top" bgcolor="cccc99" class="coffeeDesc">

class="coffeeTitle">GUATEMALA ANTIGUA


A
deeply flavorful, intense, full-bodied coffee with well-proportioned
acidity and appealing aromas of spice and chocolate. This fine
Bourbon variety coffee is shade grown at an altitude of 4,800 to 6,000
feet on the Potrero Estate, one of the first plantations south of the
ancient Guatemalan capital of Antigua. A small river still powers the
old waterwheel that separates the coffee beans from the cherries. Well-
balanced, Antigua coffee is good on its own and it blends well.






Thanks for any help, - Dave

Re: Setting cell width without specifying it

am 05.06.2007 11:48:33 von Ben C

On 2007-06-04, laredotornado@zipmail.com wrote:
> Hi,
>
> I have a table of two rows. The first row contains a single cell with
> an image. The second row contains a cell with a smaller table,
> containing an image and text on the same row. My problem is, I want
> the width of the whole table to be the width of the image in the first
> row. However, I don't want to hard code this width because it might
> change. But right now, the second row's width is expanding to fill
> the entire browser screen. Can I restrict the second row's width to
> be the first row's width without hard-coding a pixel size?

You can set the width of the cell in the second row to 1px. That won't
make it 1px wide, but as narrow as possible without breaking words.
Provided that that minimum width is narrower than the image in the first
row, then the overall table width will be determined by the width of the
image.

> Here's the code:
>
>


>
>
The Americas > src="images/coffeetheamerica.jpg" border="0">

^^^^

Change that one to


[...]