php - How Write every 7 image inside row by smarty? -


i want draw every 7 images inside row, how make smarty?

<table width="838" cellpadding="0" cellspacing="0" style="border-collapse:collapse">                                 {section name=index loop=$arrgallery}     <tr>         <td>             <img src="{$arrgallery[index].gallery_path}" width="150" height="100" style=" position:relative; z-index:1; padding:7px;"/>             <a href="" style="position:absolute; z-index:2; padding-top:50px; margin-right:20px;">delete</a>         </td>     </tr>     {/section} </table> 

instead of table fixed number of cells per row, use css's float property. objects float stack onto left side of container until fill it, fill next row, , on. adjusting width of container, control number of items per row. example:

<div style="width:560px;">   {section name=index loop=$arrgallery}     <img src="{$arrgallery[index].gallery_path}" style="float:left;width:150px;height:100px;padding:7px;"/>   {/section} </div> 

adjust div's width until 7 images fill each row (except perhaps last row).


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -