duanlie2709 2011-10-20 15:24
浏览 71

如何在我的页脚的每10个List项目之后创建一个新行

I want to break my list items to second column within a particular width so that if its 100 list items then it will create 5 column and 20 raw.

something looks like http://www.huffingtonpost.com/ (LINKS)

My CSS is :

.footer-item {
float: left;
width: 31%;
padding-bottom: 10px;
padding-left: 20px;
font-size: 14px;
font-weight: 700;
text-transform: uppercase;
}

.footer-item ul {
font-size: 12px;
text-transform: none;
font-weight: normal;
}

And My Wordpress PHP Code is

</div>
<!-- end content-wrap -->
</div>
<!-- end main-wrap -->
<div id="footer">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer") ) : ?>
<div class="footer-item">
<h3>Bookmarks</h3>
<ul>
   <?php wp_list_bookmarks('title_li=&categorize=0&limit=10'); ?>
</ul>
</div>
<div class="footer-item">
<h3>Monthy Archives</h3>
<ul>
<?php wp_get_archives('limit=10'); ?>
</ul>
</div>
<div class="footer-item">
<h3>Daily Archives</h3>
<ul>
<?php wp_get_archives('type=daily&limit=10'); ?>
</ul>
</div>

<?php endif; ?>
<div class="clear"></div>
<div id="subscribe">
<h4><img src="<?php bloginfo('template_directory'); ?>/images/feed.png" alt="Subscribe to RSS" /> Subscribe</h4>
<p>Subscribe to <a href="<?php bloginfo('rss2_url'); ?>">RSS</a> or enter you email to receive newsletter for news, articles, and updates about what's new.</p>
<form   action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php echo get_option('feedmail'); ?>', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
  <input type="text" onblur="if (this.value == '') {this.value = 'enter your email...';}" onfocus="if (this.value == 'enter your email...') {this.value = '';}" value="enter your email..." name="semail" id="semail" />
  <input type="hidden" value="<?php echo get_option('feedmail'); ?>" name="uri"/>
  <input type="hidden" name="loc" value="en_US"/>
  <input type="submit" id="submit" value="Subscribe" />
  </form>
 </div>
 <div id="footer_right">
 <ul>
  <li> <a href="<?php echo get_option('home'); ?>">Home</a></li>
  <?php wp_list_pages('title_li='); ?>
 </ul>
 <small> Copyright &copy; <a href="<?php echo get_option('home'); ?>/" class="on">
 <?php bloginfo('name'); ?>
 </a> <?php echo date("Y",time()+(7*24*60*60)); ?>. All Rights Reserved.</small><br />
 <small><a href="http://www.wordpress.com/">wordpress</a> theme by <a href="http://www.wordpress.com">wordpress</a></small> </div>
 </div>
 <!-- end footer -->

<?php } ?>
<?php wp_footer(); ?>
  • 写回答

1条回答 默认 最新

  • dqlk31541 2011-10-20 15:39
    关注

    I think this is what you want:

    http://jsfiddle.net/383uF/4/

    #column {
    border:1px solid #ccc;
    -webkit-column-width:15px;
    -moz-column-width:15px;
    column-width:15px;
    width:120px
    }
    li {
    border:1px solid #ccc;
    display:inline-block;
    }
    
    <div id="column">
     <ul>
     <li>1
     </li>
     <li>2
     </li>
     <li>3
     </li>
     <li>4
     </li>
    
     <li>5
     </li>
     <li>6
     </li>
     <li>7
     </li>
     <li>8
     </li>
    
     <li>9
     </li>
     <li>10
     </li>
     <li>11
     </li>
     <li>12
     </li>
     </ul>
    </div>
    

    Hope this helps but otherwise please elaborate.:)

    评论

报告相同问题?

悬赏问题

  • ¥15 对于这个问题的解释说明
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。