0
http://u.neighborrow.com/groups/oahu如何顯示每行兩項而不是一項?
<?php $session->flash(); ?>
<div class="user_data">
<div id="tabs" style="width:100%">
<ul>
<li><a href="#tabs-1"><?php echo strtoupper($groupName);?> Have (<?php echo $haveTotal; ?>)</a></li>
<li><a href="#tabs-2"><?php echo strtoupper($groupName);?> Want (<?php echo $wantTotal; ?>)</a></li></ul>
<div id="tabs-1">
<!--<div style="padding:10px;background:orange;margin-top:5px;">
SEARCH FOR WHAT YOU NEED <input type="text" name="search">
<a href="http://u.neighborrow.com/items/first">Add New Item</a>
</div>-->
<div id="tabs1" >
<ul>
<?php foreach($categoryLabels as $k=>$val): ?>
<li><a href="#<?php echo $k.'Items'; ?>"><?php echo $val; ?> (<?php echo $haveSubTotals[$k];?>)</a></li>
<?php endforeach; ?></ul>
<?php foreach($items as $k=>$val): ?>
<div id="<?php echo $k; ?>">
<ul class="user_have_list">
<?php if(count($val)): ?>
<?php foreach($val as $item): ?>
<li><?= $html->link($item["items"]["item"]. ' ($'.$item['items']['price'].')', array("controller" => "items", "action" => "view", $item["items"]["id"])); ?>
<div style="padding-top: 5px">
<?php if(! empty($item['items']['image']) && file_exists('images/items/'.$item['items']['image'])){ ?> <img src="<?php echo '/images/items/'.$item['items']['image']; ?>" width="100" />
<?php } else echo '<img src="/images/noimage.gif" />'; ?>
</div>
</li>
<?php endforeach; ?>
<?php else: ?>
<li class="nothing">Nothing</li>
<?php endif; ?>
</ul>
</div>
<?php endforeach; ?>
</div> <!-- #tabs1 -->
</div> <!-- #tabs-1 -->
<div id="tabs-2">
<div id="tabs2">
<ul>
<?php foreach($categoryLabels as $k=>$val): ?>
<li><a href="#<?php echo $k.'RequestItems'; ?>"><?php echo $val; ?> (<?php echo $wantSubTotals[$k]; ?>)</a></li>
<?php endforeach; ?>
</ul>
<?php foreach($requests as $k=>$val): ?>
<div id="<?php echo $k; ?>">
<ul class="user_have_list">
<?php if(count($val)):
foreach($val as $request): ?>
<li>
<?php echo $html->link($request["Request"]["item"].' ($'.$request['Request']['price_item'].')', array("controller" => "requests", "action" => "view", $request["Request"]["id"]));
if(! empty($request['Request']['image_path'])) echo '<img style="padding-top: 5px" src="'.$request['Request']['image_path'].'" width="100" />'; else echo '<img style="padding-top: 5px" src="/images/noimage.gif" />'; ?>
</li>
<?php endforeach; ?>
<?php else: ?>
<li class="nothing">Nothing</li>
<?php endif; ?>
</ul>
</div>
<?php endforeach; ?>
</div> <!-- #tabs2 -->
</div> <!-- #tabs-2 -->
</div>
是的,我只是使用鉻/檢查元素並能夠做到這一點..謝謝... – adam 2011-03-18 06:14:00
現在我有正確的邊際,但它仍然只是每行不是2? http://u.neighborrow.com/groups/Cinicinnati_Clifton_and_Northside – adam 2011-03-18 06:15:23
display:inline-block; – adam 2011-03-18 06:17:30