| | |
|
|
|
swap images... auto resize of table... how? |
| message from cerio on 23 Jul 2004 |
Hi,
I have a table on a webpage (created in Dreamweaver) in which there is an
large image. On clicking thumbnails elsewhere on the page, this large image
swaps to one to go with the thumbnail clicked, an enlargement of the thumbnail.
The large images vary in height though are the same width. I find if the first
image displayed is smaller than others, they shrink in height and distort to
fit in the table but if I make the first one on view one of the longer ones,
the smaller ones then stretch to fit their height, when swapped into the same
table.
How do I get the table to automatically stretch in height to fit the longer
images and to shrink down to fit the smaller images, as they swap in and out.
At present I have not dictated a height for the table in the code, just a
width.
Thanks.
C
|
| Murray *TMM* replied to cerio on 23 Jul 2004 |
You can do this many ways ways -
1. Don't use swap image - use Show/Hide layer instead. Have the alternate
image in a hidden layer that is shown when the trigger is 'tickled'. Using
this method you can have images that are any dimension.
2. Use swap image, but remove the dimensions from the original image's tag,
i.e., change this -
<img name="original" width="150" height="220" ...
to this -
<img name="original" ...
Now when you swap in your offsize image, there is no predefined size to
change it to. Be aware that this method may well result in an unpleasant
and undesirable 'rearrangement' of your page layout as it adjusts to your
new image's dimensions.
3. Pad the smaller image with canvas background color on all sides so that
all the images *are the same size*.
4. Use a SetTextofLayer behavior to change the image reference in a layer
positioned so that it will show the desired larger image in the proper
place.
5. Use the PVII ShowPic extension - http://www.projectseven.com/
Take your pick....
|
| Murray *TMM* replied to Murray *TMM* on 23 Jul 2004 |
But your page moves around as the different sized images come in, no?
|
|
Archived message: swap images... auto resize of table... how? (Macromedia Dreamweaver)