How do I resize an image in a div in the following manner?

uA43

New Member
OK, I have doubt guys... The question is Suppose i have placed a series of images of various widths in a div and i want all of them to be resized to fit the div if they cross 700px in height and width.

How can I do so?
max-width:xxpx or max-width:xx% in ur css
mellow.gif
or in ur tag
<div style="max-width:xx%;max-height:xx%">
XX
</div>
well it would resize to xx% of div's height or width

*thanks to RT
fear.gif
(he recommended me that some days ago
tongue.gif
) #div img{
height: auto;
max-width: 700px;
}

No sure tho
biggrin.gif


edit:
After reading it again I think you want this:

#divname img{
height: 100%;
width: 100%;
max-width: 700px;
max-height: 700px;
}

OR

#divname img{
height: 100%;
max-width: 700px;
}

Just keep on fiddling until it works on all browsers.
 
Top