I'm using the jquery photo cycle tool to display a list of company logo's on my website. I randomly select 5 remote image urls from the DB to be displayed on each page, and center the element on the page.
<div align="center">
Featured Companies
<div class="logos" align="center">
<?php
foreach($this->logos as $logo) :
echo "<a title=\"".$logo->name."\" href=\"./company/listrunners/company/".$logo->id."\"><img src=\"".$logo->image."\"/></a>\n";
endforeach;
?>
</div>
</div>
The css for the logo div
.logo {
padding: 0;
margin: 0;
}
.logo img {
position: inherit;
padding: 15px;
border: 1px solid #ccc;
background-color: #eee;
top: 0;
left: 0;
max-width: 200px;
}
The problem is since the company logo's are difference sizes, the alignment of the photo cycle widget can change depending on the random selection, appear either in the center or else on the left. Without know the size of the images that will be displayed, is there a way to ensure all logo's are shown in the center?