Well, I hope there are any css gurus around who can help - please see the page code below: the goal is to show the picture placeholder in 2 rows. the problem is that if I float the row to the left, it ignores the parent container and the float starts at the end of the sidebar - that’s not what we want.
giving a height to the row container seems to solve the issue but I’m not sure if this is what we want.
the reason I’m pointing out this stuff is that it is not only just a problem showing some pictures in a row but the whole MaxiGallery manager layout is also messed up.
One thing I was trying is to put all images in a container div instead of having just a BR tag that clear the floats - this would also allow different coloring of the picture rows. this is what I came up so far:
if ($counter == 1) {
$outerTplData['pictures'] .= '<div class="clearfix irow">';
}
$outerTplData['pictures'] .= $tpl->Render();
if($counter == $mg->mgconfig['pics_per_row']) {
$outerTplData['pictures'] .= '</div>';
$counter = 0;
}
$counter++;
probably there is a better way to do it.
<!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>Untitled Document</title>
<style type="text/css">
<!--
#container
{
width: 90%;
margin: 10px auto;
background-color: #fff;
color: #333;
border: 1px solid gray;
line-height: 130%;
}
#top
{
padding: .5em;
background-color: #ddd;
border-bottom: 1px solid gray;
}
#top h1
{
padding: 0;
margin: 0;
}
#leftnav
{
float: left;
width: 160px;
margin: 0;
padding: 1em;
}
#content
{
margin-left: 200px;
border-left: 1px solid gray;
padding: 1em;
max-width: 36em;
}
#footer
{
clear: both;
margin: 0;
padding: .5em;
color: #333;
background-color: #ddd;
border-top: 1px solid gray;
}
#leftnav p { margin: 0 0 1em 0; }
#content h2 { margin: 0 0 .5em 0; }
/* image rows */
div.row {
margin-bottom: 10px;
background: #FFFF99;
/*height: 50px;*/
}
div.row img {
float: left;
margin-right: 5px;
}
-->
</style>
</head>
<body>
<div id="container">
<div id="top">
<h1>Header</h1>
</div>
<div id="leftnav">
<p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>
</div>
<div id="content">
<h2>Subheading</h2>
<p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>
<p> Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p>
<div class="row"><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /></div>
<div class="row"><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /><img name="" src="" width="32" height="32" alt="" style="background-color: #CCFF99" /></div>
</div>
<div id="footer"> Footer </div>
</div>
</body>
</html>