我有一个包含三个部分的登录页面——一个最新的博客部分、一个关于部分和一个 Tweeter 提要。这些元素的样式和格式都相同,但是最近的博客部分有些地方不太对劲。具体来说,在 , 下有一个更大的空间<h2><a href="http://growingedgecoaching.com/blog">Growing Edge Blog</a></h2>
,并且<a href="http://growingedgecoaching.com/home"><span style="color:#b8bf33">Continue Reading</span></a></p>
比它应该的更向下和更大。
有任何想法吗?
这是相关代码:
<div id="landing-brief">
<ul>
<li>
<h2><a href="http://growingedgecoaching.com/blog">Growing Edge Blog</a></h2>
<p>
<?php
// Get the most recent post
$the_query = new WP_Query( 'posts_per_page=1' );
// Pull the excerpt
while ( $the_query->have_posts() ) : $the_query->the_post();
the_excerpt();
endwhile;
// Reset Post Data
wp_reset_postdata();
?>
<br /><br /><a href="http://growingedgecoaching.com/home"><span style="color:#b8bf33">Continue Reading</span></a></p>
</li>
<li>
<h2><a href="index.php?page_id=27">Meet Mary Anne</a></h2>
<p>Mary Anne is the founder of Growing Edge Coaching™, a coaching and consulting company, where she helps individuals and companies develop powerful strategies to move forward in their life, their work, or their business. Her coaching is founded on her 20 years of experience as a manager and senior leader in non-profits. <br /><br /><a href="index.php?page_id=27"><span style="color:#b8bf33">More About Mary Anne</span></a></p>
</li>
<li>
<h2><a href="#">Recent Tweets</a></h2>
<div id="twitter-feed">
<?php
include_once(ABSPATH . WPINC . '/feed.php');
$rss = fetch_feed('https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=Growing_Edge');
$maxitems = $rss->get_item_quantity(3);
$rss_items = $rss->get_items(0, $maxitems);
?>
<ul>
<?php if ($maxitems == 0) echo '<li>No items.</li>';
else
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) : ?>
<li>
<?php echo str_replace('Growing_Edge: ', '', $item->get_title()); ?>
</li>
<?php endforeach; ?>
</ul>
</div><!-- end twitter-feed -->
<br /><br /><a href="https://twitter.com/growing_edge"><p><span style="color:#b8bf33">Follow @Growing_Edge</span></p></a>
</li>
</ul>
</div><!-- end brief -->
#landing-brief {
width: 860px;
margin: 0 auto;
padding-bottom: 20px;
padding-top: 40px;
}
#landing-brief ul li {
display: inline-block;
padding-right: 20px;
vertical-align: top;
width: 250px;
}
#landing-brief ul li:last-child {
padding-right: none;
}
#landing-brief ul li p span {
color: #b8bf33;
}
#landing-brief #twitter-feed {
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 75%;
line-height: 1.5;
color: #333333;
margin-left: -28px;
}
#landing-brief #twitter-feed ul li {
padding-bottom: 5px;
}