用smarty php打印链接

this code block is printing links to a div but the first link prints in the correct location and the rest print outside of the div. any ideas why?

{if count($from)}
<div class="classifieds">
<div class="pop">
<ul>
{foreach from=$from item=item key=key name=tmp}
  <li>
    <div class="title"><a href="{$item.link}">{$item.title}</a></div>
  </li>
   {if $item.featured}</div>{/if}
{/foreach}
</ul>
</div>
 </div>
{else}
<div class="centerText">{$language.nothing_found}</div>
{/if}

If i could understand this correctly

{if count($from)}
<div class="classifieds">
<div class="pop">
<ul>
{foreach from=$from item=item key=key name=tmp}
  <li>
    <div class="title"><a href="{$item.link}">{$item.title}</a></div>
  </li>
   {if $item.featured}</div>{/if}//remove this line
{/foreach}
</ul>
</div>
 </div>
{else}
<div class="centerText">{$language.nothing_found}</div>
{/if}