I actually got it to work using a little bit of everyone's information. Thanks to everyone who helped out...

w

Wayne Godfrey
[EMAIL PROTECTED]
On Jun 30, 2005, at 11:01 PM, Kevin Futter wrote:

On 1/7/05 12:41 PM, "Wayne Godfrey" <[EMAIL PROTECTED]> wrote:

Ideally I would like to use only one image at it's largest size, say
200px wide, I can control the width, what I have no control over is the
height. I also need the image to float right (sorry to be so needy!)
and ideally I would like to get to two or three classes to solve this,
IF indeed the images will constrain. I've found this code and it works:

#zoom a img {
float:right;
height: 198px;
width: 150px;
margin: 0 15px 5px 5px;
}

#zoom a:hover img {
height: 329px;
width: 250px;
}

But like I said, this requires me to code each image individually,
using the above or even what you've given me below, can I eliminate the
"height" and keep the image constrained?

If I understand correctly what you're trying to do, then yes, the images will remain constrained at the width you set, with the browser automatically adjusting the height to preserve the image's aspect ratio. Just leave the height declaration out of your CSS and/or HTML. You'll get a fixed width
with variable height.

--
Kevin Futter
Webmaster, St. Bernard's College
http://www.sbc.melb.catholic.edu.au/



******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************


******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to