我尝试将填充和边距底部添加到后期内容,因为它可以工作,仍然没有,帮助 My blog
* {margin:0;padding:0;}
html {
position: relative;
min-height: 100%;
}
body,td,th {
font-family: verdana;
font-size: 11px;
color: #333333;
margini:0;
padding:0;
text-align:center; /* hack para o IE */
}
#all {
width: 1000px;
margin:0 auto;
text-align:left; /* "remédio" para o hack do IE */
}
a:link {
color: #111111;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #111111;
}
a:hover {
text-decoration: none;
color: #FF9999;
}
a:active {
text-decoration: none;
color: #111111;
}
.menusize {
background-color: #http://twitter.com/ ;
width: 1000px;
color: #FFFFFF;
}
#menu ul {
padding:0px;
margin:0px;
background-color:#ff9999;
list-style:none;
text-align: center;
vertical-align: middle;
line-height: 40px;
font-family: verdana;
font-size: 15px;
font-variant: small-caps;
color: #FFFFFF;
}
#menu ul li { display: inline; }
#menu ul li a {
padding: 2px 10px;
display: inline-block;
/* visual do link */
background-color:#ff9999;
color: #FFFFFF;
text-decoration: none;
}
.post {
clear: left;
float: left;
width: 690px;
margin-bottom:50px;
}
.date {
clear: left;
float: left;
background:#fff url('date.png') no-repeat scroll top left;
width:80px;
height:80px;
color:#FFFFFF;
text-align:center;
}
.date .date-month {
height:18px;
font-size:13px;
font-family:verdana;
font-weight:bold;
}
.date .date-day {
font-family:verdana;
font-size:18px;
}
.title {
font-family: 'Vibur', cursive;
font-size: 30px;
}
.post {
padding-bottom: 15px;
}
.tag {font: 12px/20px Arial; color:#333333; text-transform: uppercase; padding: 5px 0 0 0; height: 20px; overflow: hidden; -moz-border-radius: 15px;
border-radius: 15px;}
.tag a {color:#FFFFFF; background:#ff9999; padding: 3px 5px 3px;-moz-border-radius: 15px;
border-radius: 15px;}
.tag a:hover {color:#FFFFFF; background:#88cfd5; -moz-border-radius: 15px;
border-radius: 15px;}
.sidebar {
clear: right;
float: right;
width: 300px;
margin-bottom:50px;
}
.footer {
background-color: #88CFD5;
clear: both;
float: none;
position: absolute;
left: 0;
bottom: 0;
height: 20px;
width: 100%;
overflow:hidden;
margin-top:10px;
}
.post-stuff {
margin-bottom: 30px;
}
h1 {
font-size: 14px;
color: #333333;
}
.profile img {
background-color: #FFFFFF;
padding: 5px;
border: 1px solid #666666;
}
和wordpress索引文件
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
<div class="info1">
<div class="date"><div class="date"><br />
<div class="date-month"><?php the_time('M'); ?></div>
<div class="date-day"><?php the_time('d'); ?></div>
</div></div>
<div class="title"> <div align="center"><?php the_title(); ?> <br />
</div></div>
</div>
<div class="post-content"><?php the_content('Continue lendo »'); ?> </div>
<div class="post-stuff"><div align="center"><div class="tag"> posted in: <?php the_tags('', ', '); ?> - <?php comments_popup_link(__('0 Comments'), __('1 Comment'), __('% Comments'),'Commentslink', __('Comments are closed')); ?> </div></div>
<?php endwhile; ?><?php else : ?><?php endif; ?>
</div>
<?php get_footer(); ?>
答案 0 :(得分:0)
首先,有一个拼写错误:margini,删除i。
现在我的建议是你的索引文件。这将正确渲染div:
<?php get_header(); ?>
<?php get_sidebar(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post">
<div class="info1">
<div class="date"><br />
<div class="date-month"><?php the_time('M'); ?></div>
<div class="date-day"><?php the_time('d'); ?></div>
</div>
</div>
<div class="title">
<div align="center"><?php the_title(); ?> <br /></div>
</div>
<div class="post-content"><?php the_content('Continue lendo »'); ?></div>
<div class="post-stuff">
<div align="center">
<div class="tag"> posted in: <?php the_tags('', ', '); ?> - <?php comments_popup_link(__('0 Comments'), __('1 Comment'), __('% Comments'),'Commentslink', __('Comments are closed')); ?> </div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
<?php get_footer(); ?>