0

我几乎在这里完成了我的网站:http ://www.divisionforty.com/wall/我已经来到最后一部分是让这个内容居中http://www.divisionforty.com/wall/艺术家/cali-balles/

这是代码:

<?php  get_header(); ?>
 <div class="row">
                <div class="span4">

                    <h2><a href="<?php  the_permalink()   ?>"><?php  the_title(); ?></a></h2>
                    <p>
<?php 

    if ( have_posts() ) :
    while ( have_posts() ) :
    the_post();
    ?>
    <div <?php  post_class()   ?> id="post-<?php  the_ID(); ?>">
            <?php  the_content(); ?>
    </div>
    <?php 
    endwhile;
    endif;
    ?>      </p>
        </div>
                    <div class="span8" id="thumbnails">
                        <?php  postimage($size=thumbnail, $qty=-1)    ?> 
                    </div>
</div>
<?php  get_footer(); ?>

该页面实际上没有任何样式自定义,因此它是基本的引导程序。

希望有人能帮忙,

丹佛

为了澄清这一点,我想要集中:在此处输入图像描述

4

2 回答 2

0

创建一个新的容器类。

<div class="container_2">
  <div class="row">
     <div class="span4">
         ...
     </div>   
  </div>
</div>

在你的CSS中,添加这个

.container_2 {
  width: 1200px;  //you can change this.
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

}

于 2013-10-06T05:13:55.123 回答
0

尝试这个

  1. max-width:1280px从你的身上取下#wrap div

  2. 在你的.rowdiv 上设置宽度max-width:1200和边距margin:0 auto

  3. 您还可以添加text-align: center;到您的.rowdiv 中,以便您的文本居中。

随着页面变小,这应该使您的内容居中。(不太确定您在寻找什么。这将确保您的标题一直穿过页面,同时将其下方的内容居中。)

于 2013-10-06T04:48:28.897 回答