tomharto
04-23-2011, 01:02 PM
I have a gallery (3 by x size) and no matter how many images the containing div always closes before the last line. Heres the source code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gallery</title>
<style>
body
{
margin:0;
padding:0;
}
/*img {
border:solid 5px white;
border-bottom-width:20px;
}*/
.imgCont {
background-color:#333;
float:left;
margin:5px 5px;
}
</style>
</head>
<body>
<div style="width:800px;margin:0 auto;background-color:#999;">
<div id='galleryCont' style='width:780px;margin:0 auto;'>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/1.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/10.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/11.jpg" style="margin:0px 51.25px" width="147.5" height="250" /></div>
<div style='clear:both;'></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/12.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/13.jpg" style="margin:0px 39.5833333333px" width="170.833333333" height="250" /></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/14.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
<div style='clear:both;'></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/15.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
</div></div>
</body>
</html>
and this is how it shows up. Can anyone help me figure out why?
http://todieamartyr.co.uk/files/galleryerror.jpg
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Gallery</title>
<style>
body
{
margin:0;
padding:0;
}
/*img {
border:solid 5px white;
border-bottom-width:20px;
}*/
.imgCont {
background-color:#333;
float:left;
margin:5px 5px;
}
</style>
</head>
<body>
<div style="width:800px;margin:0 auto;background-color:#999;">
<div id='galleryCont' style='width:780px;margin:0 auto;'>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/1.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/10.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/11.jpg" style="margin:0px 51.25px" width="147.5" height="250" /></div>
<div style='clear:both;'></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/12.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/13.jpg" style="margin:0px 39.5833333333px" width="170.833333333" height="250" /></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/14.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
<div style='clear:both;'></div>
<div class="imgCont" style='width:250px;height:250px;'>
<img src="../photos2/15.jpg" style="margin:0px 41.6666666667px" width="166.666666667" height="250" /></div>
</div></div>
</body>
</html>
and this is how it shows up. Can anyone help me figure out why?
http://todieamartyr.co.uk/files/galleryerror.jpg