首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >元素之间的奇数间距

元素之间的奇数间距
EN

Stack Overflow用户
提问于 2012-07-31 09:54:25
回答 1查看 110关注 0票数 0

我有一个有三个部分的登录页面-最近的博客部分,关于部分和推特馈送。这些元素的样式和格式都是一样的,但是最近的博客部分有些地方不太对劲。具体地说,在,<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>比它应该的更低和更大。

有什么想法吗?

Live site.

相关代码如下:

代码语言:javascript
复制
<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;
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-07-31 10:03:20

代码语言:javascript
复制
<h2><a href="http://growingedgecoaching.com/blog">Growing Edge Blog</a></h2>
<p>
 <p>“Embrace the messy imperfect genius. Seek to be misunderstood by creative minds.” ~Ross Martin One thing I have learned over the years as an entrepreneur is that when I am in my most creative space, I have to release being a perfectionist and jump into my creative messiness. I need to create space that allows [...]</p>
 <br /><br />
 <a href="http://growingedgecoaching.com/home"><span style="color:#b8bf33">Continue Reading</span></a>
</p>

应该是这样:

代码语言:javascript
复制
<h2><a href="http://growingedgecoaching.com/blog">Growing Edge Blog</a></h2>
<p>
  “Embrace the messy imperfect genius. Seek to be misunderstood by creative minds.” ~Ross Martin One thing I have learned over the years as an entrepreneur is that when I am in my most creative space, I have to release being a perfectionist and jump into my creative messiness. I need to create space that allows [...]
 <br /><br />
 <a href="http://growingedgecoaching.com/home"><span style="color:#b8bf33">Continue Reading</span></a>
</p>

我建议你使用像Chrome Developer工具栏这样的检查工具来检查页面,它提供了很多信息,帮助你找出问题所在。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11732087

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档