Wordpress的问题';div class=";“邮政”&引用;条目“;及;postmetadata“;

Wordpress的问题';div class=";“邮政”&引用;条目“;及;postmetadata“;,class,post,html,Class,Post,Html,我在wordpress中的代码有问题。您可以在下面的链接中看到我的问题: 正如你所看到的,我很难把它们粘在一起 CSS代码在这里: .post{ padding: 10px 0 0 0px; background-image: url(images/toppost.png); background-repeat:no-repeat; } .entry{ background-image:url(images/ContentBG.png); margin: 0 0 0 0; padding:

我在wordpress中的代码有问题。您可以在下面的链接中看到我的问题:

正如你所看到的,我很难把它们粘在一起

CSS代码在这里:

.post{
padding: 10px 0 0 0px;
background-image: url(images/toppost.png);
background-repeat:no-repeat;
}


.entry{
background-image:url(images/ContentBG.png);
margin: 0 0 0 0;
padding:0 0 0 0;
background-position: bottom;
}

.postmetadata {
clear: both;
background-image: url(images/post-footer.png);
background-repeat:no-repeat;
height:118px;
}
<div id="container">

    <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>

        <div class="post" id="post-<?php the_ID(); ?>">
        <h2><a href="<?php the_permalink(); ?>"title="<?php the_title(); ?>"><?php the_title(); ?> </a></h2>
        </div>

        <div class="entry">
        <?php the_content(); ?></div>

            <p class="postmetadata">
                <?php _e('Filed under&#58;'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php  the_author(); ?><br />
                <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?> <?php edit_post_link('Edit', ' &#124; ', ''); ?>
            </p>



    <?php endwhile; ?>
php代码在这里:

.post{
padding: 10px 0 0 0px;
background-image: url(images/toppost.png);
background-repeat:no-repeat;
}


.entry{
background-image:url(images/ContentBG.png);
margin: 0 0 0 0;
padding:0 0 0 0;
background-position: bottom;
}

.postmetadata {
clear: both;
background-image: url(images/post-footer.png);
background-repeat:no-repeat;
height:118px;
}
<div id="container">

    <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>

        <div class="post" id="post-<?php the_ID(); ?>">
        <h2><a href="<?php the_permalink(); ?>"title="<?php the_title(); ?>"><?php the_title(); ?> </a></h2>
        </div>

        <div class="entry">
        <?php the_content(); ?></div>

            <p class="postmetadata">
                <?php _e('Filed under&#58;'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php  the_author(); ?><br />
                <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?> <?php edit_post_link('Edit', ' &#124; ', ''); ?>
            </p>



    <?php endwhile; ?>


您需要在类中添加填充:

.post{
padding: 10px 5px 0 5px;
background-image: url(images/toppost.png);
background-repeat:no-repeat;
}


.entry{
background-image:url(images/ContentBG.png);
margin: 0 0 0 0;
padding:0 5px;
background-position: bottom;
}

.postmetadata {
clear: both;
background-image: url(images/post-footer.png);
background-repeat:no-repeat;
height:118px;
padding:0 5px;
}

尝试添加!每个填充的重要性:填充:0 5px!重要的如果没有你页面的html代码,我就无能为力。你能提供一个链接让我看到问题吗?我发布了上面的HTML/PHP代码,你可以看看。对不起,我用Xampp在本地电脑上工作。鲍比,是你拉的!非常感谢你的帮助。一个小时以来,我一直盯着显示器看这个愚蠢的问题。再次感谢你的帮助。