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
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
(he recommended me that some days ago
) #div img{
height: auto;
max-width: 700px;
}
No sure tho
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.
How can I do so?
max-width:xxpx or max-width:xx% in ur css
<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
height: auto;
max-width: 700px;
}
No sure tho
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.