Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Proportionally fitting images in Slideshow 2!

Status
Not open for further replies.

nickharambee

Technical User
Jan 2, 2010
7
GB
Hi

I have set an overall size for the Slideshow 2! div in the CSS file as follows:

.slideshow {
height:250px;
margin: 0 auto;
width:420px;
}

I would then like all the images I use in the slideshow to fit within this area (i.e. 420 x 250). The images will all have a height of 250px, but different widths. For widths less than 420px I would like the image to be positioned centrally in the div along the horizontal axis as in the following image:

m.png


for images wider than 420px I would like them to be positioned centrally in the div along the vertical axis as in the following image:

m.png


I wonder if it's possible to achieve this with Slideshow 2! and if not, whether another script will help me achieve this?

Thanks

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top