2011-12-01 62 views
0

我使用css for wordpress在後期設置圖像位置?如何在wordpress中設置圖片位置?

single.php  
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?> 
    <div align="center"><h6><?php the_title();?></h6></div> 
     <div class="isi"> 

    <?php the_content();?> 

     </div> 

    <?php endwhile; ?> 
    <?php else : ?> 


    <div id="post-<?php the_ID(); ?> " <?php post_class(); ?> 
    <h2><?php _e('Not Found'); ?></h2> 
    </div> 
    <?php endif; ?> 


style.css 
.isi img{float:left; } 

,我想

image --------- 
--------------- 
--------------- 
----------image 
--------------- 

有任何想法解決我的問題有何看法?

回答

3

當你添加一個圖像到一個WordPress頁面或文章,它會詢問你是否要對齊它的左,中或右。在將其插入帖子之前,請選擇其中一個選項。

如果你已經建立了一個自定義主題,記得要添加到你的CSS

.alignleft{float: left;} 

.alignright{float: right;} 
+0

哇謝謝它的作品!我不需要添加任何東西 –

1

非常含糊,沒有看到頁面,甚至模糊,但這裏有:將floatleft類添加到您的第一個圖像,並將floatright添加到您的第二個圖像。看看這裏:http://jsfiddle.net/jalbertbowdenii/f6mJp/

+0

更新http://jsfiddle.net/f6mJp/2/ –

+0

沒有,我想BOS用戶不需要編碼任何東西,所以我需要像上面的CSS來解決我的問題。感謝您的回答 –

+0

我很困惑...我提供的解決方案是@toby_lh給出的完全相同的東西...儘管我喜歡他的解釋更好,它不像你給了很多去 – albert