如何每行显示两个项目而不是一个?
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>
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 green.css 的第 96 行中,
通过添加允许每个项目适合的宽度来进行此更改。
这是假设您正在谈论在屏幕底部制作 2 个搜索结果,因为您的问题非常模糊,您甚至没有提及您想要更改页面的哪个部分
in green.css on line 96 make this change
by adding the width it will allow each item to fit.
This is assuming your talking about making 2 search results a the bottom of the screen, as your question is VERY vague and you do not even mention what section of the page you want to change