1.Margin & Padding
例1:
.div {
margin-top:10px;
margin-right: 5px;
}.div {
margin:10px 20px 0;
}
例3 :
.div {
margin-left:auto;
}<div id="content" class="narrowcolumn">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__(‘Permanent Link to %s‘, ‘kubrick‘), the_title_attribute(‘echo= 0‘)); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time(__(‘F jS, Y‘, ‘kubrick‘)) ?> <!-- by <?php the_author() ?> --></small>
<div class="entry">
<?php the_content(__(‘阅读本条目的其余部分 ?‘, ‘kubrick‘)); ?>
</div>
<p class="postmetadata"><?php the_tags(__(‘Tags:‘, ‘kubrick‘) .‘ ‘, ‘, ‘, ‘<br />‘); ?> <?php printf(__(‘Posted in %s‘, ‘kubrick‘), get_the_category_list(‘, ‘));
?> | <?php edit_post_link(__(‘Edit‘, ‘kubrick‘), ‘‘, ‘ | ‘); ?> <?php comments_popup_link(__(‘No Comments ?‘, ‘kubrick‘), __(‘1 条评论 ?‘, ‘kubrick‘), __(‘% Comments ?‘, ‘库布里克‘), ‘‘, __(‘评论关闭‘, ‘库布里克‘) ); ?></p>
</div>
<?php endwhile; ?>
<div class="导航">
<div class="alignleft"><?php next_posts_link(__(‘? Older Entries‘, ‘kubrick‘)) ?></div>
<div class="alignright"><?php previous_posts_link(__(‘Newer Entries ?‘, ‘kubrick‘)) ?></div>
</div>
<?php 其他:?>
<h2 class="center"><?php _e(‘Not Found‘, ‘kubrick‘); ?></h2>
<p class="center"><?php _e(‘抱歉,您正在寻找不在这里的东西。‘, ‘kubrick‘); ?></p>
<?php 包含 (TEMPLATEPATH ."/searchform.php"); ?>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php get_header(); ?>