stretching table height to fit image swaps

  • cerio
  • Proficient
  • Proficient
  • User avatar
  • Posts: 263
  • Loc: UK

Post 3+ Months Ago

Hi,
I have a table on a webpage (created in Dreamweaver) in which there is an image. On clicking thumbnails elsewhere on the page, this image swaps 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 one then stretches to fit their height, when swapped into the same table.

How do I get the table to 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
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • fional24
  • Graduate
  • Graduate
  • fional24
  • Posts: 125
  • Loc: Scotland

Post 3+ Months Ago

you could put each image in a layer and then add behaviours to show and hide the layers depending on which one is clicked. Because each layer can be sized to fit each image, you wont have your stretching problem.
  • cerio
  • Proficient
  • Proficient
  • User avatar
  • Posts: 263
  • Loc: UK

Post 3+ Months Ago

Hi.
Thanks for the reply.

I've never used layers. Do some browsers not have problems with those? If some do, I don't want to risk using them if I can avoid it at all.

C
  • fional24
  • Graduate
  • Graduate
  • fional24
  • Posts: 125
  • Loc: Scotland

Post 3+ Months Ago

Yes, there are some issues when it comes to positioning, not all browsers place them where you expect! There are lots of tips in the forum, which should help you out.

I have made a lot of photo galleries using this method and I have never had any major browser issues so far.
  • cerio
  • Proficient
  • Proficient
  • User avatar
  • Posts: 263
  • Loc: UK

Post 3+ Months Ago

Hi.

I got the answer... I removed the sizes, in the code, of the original image and now it works a treat.

Thanks for replies.

C

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 44 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.