fixed width of table cells

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
 If I set the width of an image wider than the width of the cell into
which it goes, the cell automatically widens to accommodate the wider
image.  How do I stop the table from doing that?  Thanks in advance.

Tony Vella
Ottawa, Ontario, Canada

Re: fixed width of table cells

Quoted text here. Click to load it

I guess you can set the image as a cell background:

<td style="width: 50px; max-width: 50px;">
                 <img style="width: 70px; height: 50px;"
                              alt="background image"

Re: fixed width of table cells

Quoted text here. Click to load it

OOOPs ignore above ... that's an image in a cell not as a background:
<td  style="background-image: imagename.png);
                  background-attachment: fixed;
                  background-position: center bottom;">

Re: fixed width of table cells

tony vella wrote:

Quoted text here. Click to load it

And why would you do that? What should happen - should the image be cut off,
or should it overflow outside the cell, or should be shrunk?

As usual, a URL would tell us what you are really doing and would probably
enable us to provide a real solution to the _real_ problem you have been

On second thought, looking at the URL in your sig, I see
"Resolution: 1280x800 or higher.
Web-font: Times Roman or System Substitute."

I think your site needs a sanity check first. Telling you about table-layout
ooops I almost said it
would just help you in shooting yourself on the foot. Which would be fine if
you were my competitor, of course.


Re: fixed width of table cells

In article
Quoted text here. Click to load it

When I was in a killfile one day, I was locked in a nice sunny
cell. I was provided with nice warm and colourful blankets. I was
even allowed to carry on my hobbies. Here is a picture I took one
afternoon. By the way to the thread question, you can see it has
the unusual aesthetically fractal attribute of remaining
reasonably nice even when cut off.


Opera, as usual, insists on doing things differently to browsers
like FF and Safari. See for yourself.


Re: fixed width of table cells

On Fri, 26 Mar 2010 08:02:15 -0700 (PDT), tony vella

Quoted text here. Click to load it

1.  Resize your image first in PSP or Photoshop or whatever...


2.  Set the width of the image to what you want, and leave height off.
The image will resize automaticall, keeping aspect ratio... but you
may lose clarity this way.


Site Timeline