Forum Moderators: not2easy
Cheers Dave
and a warm welcome to these forums. ;)
Here is a basic example using the webmasterworld logo above...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
html,body {
height:100%;
margin:0;
padding:0;
}
#image_container {
width:50%;
height:50%;
border:3px double #999;
margin:2% auto;
}
#image_container img {
width:100%;
height:100%;
}
</style></head>
<body><div id="image_container">
<img src="http://www.webmasterworld.com/gfx/logo.png" alt="logo"/>
</div></body>
</html>
birdbrain
Any image in image container will conform to fit the div's size. I find it strange you had problems with this, because it would even work if you did this:
<div height="100px" width="100px"><img src="logo.gif" height="100%" width="100%"></div>
No problem, you're welcome. ;)