#zone-pic a{ color:#000; text-decoration:none; text-align:center; font-size:13px; line-height:14px; display:block; } #zone-pic .item{ width:180px; float:left; margin:7px; } #zone-pic .item .thumb{ /** css crop image **/ width: 180px; height:112px; padding:1px; overflow:hidden; background:#000; border:1px dashed #000; } #zone-pic .item img{ /** css trick full width aspect ratio **/ width:100%; height:auto; min-height:100%; display:block; } #zone-pic .row{ display:block; clear:both; } '; $num = 15; $links = array(); foreach(ssi_zpic(array(0,15),$num,true) as $topic) { $links[] = '
'.$topic['subject'].'
'; } $nRow = 3; echo '
'; for($i=0;$i<$nRow;$i++) { $row = array_splice($links,0,floor($num/$nRow)); echo '
'.implode(' ',$row).'
'; } echo '
';