mwschenck
08-05-2008, 04:57 PM
I have the page below, and what I need is for all of the images to resize to the DIV that is resized according to the screen height.
I tried it in a table, and not in a table (below), and the images go beyond the height of the resized div.
Assuming each of the 18 base image sizes is 100x x 200h. 2 columns of 9 images
Thank you
---------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>One Hundred Percent Height Divs</title>
<style type="text/css" media="screen">
body {
margin:0;
padding:0;
height:100%; /* this is the key! */
}
#left {
position:absolute;
left:0;
top:0;
padding:0;
width:200px;
height:100%; /* works only if parent container is assigned a height value */
color:#333;
background:#eaeaea;
border:1px solid #333;
}
.content {
margin-left:220px;
margin-right:220px;
margin-bottom:20px;
color:#333;
background:#ffc;
border:1px solid #333;
padding:0 10px;
}
</style>
</head>
<body>
<div id="left">
<img class="button" name="menu_r1_c1" src="images/prev.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/next.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/first.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/last.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/1.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/2.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/3.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/4.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/5.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/6.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/7.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/8.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/9.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/a.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/bv.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/c.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/d.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/e.jpg" border="0">
<br>
</div>
</body>
</html>
I tried it in a table, and not in a table (below), and the images go beyond the height of the resized div.
Assuming each of the 18 base image sizes is 100x x 200h. 2 columns of 9 images
Thank you
---------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>One Hundred Percent Height Divs</title>
<style type="text/css" media="screen">
body {
margin:0;
padding:0;
height:100%; /* this is the key! */
}
#left {
position:absolute;
left:0;
top:0;
padding:0;
width:200px;
height:100%; /* works only if parent container is assigned a height value */
color:#333;
background:#eaeaea;
border:1px solid #333;
}
.content {
margin-left:220px;
margin-right:220px;
margin-bottom:20px;
color:#333;
background:#ffc;
border:1px solid #333;
padding:0 10px;
}
</style>
</head>
<body>
<div id="left">
<img class="button" name="menu_r1_c1" src="images/prev.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/next.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/first.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/last.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/1.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/2.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/3.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/4.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/5.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/6.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/7.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/8.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/9.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/a.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/bv.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/c.jpg" border="0">
<br>
<img class="button" name="menu_r1_c1" src="images/d.jpg" border="0">
<img class="button" name="menu_r1_c1" src="images/e.jpg" border="0">
<br>
</div>
</body>
</html>