2014-06-22 59 views
-1

我有一個新成員.... 我有一個無法解決的Web編程問題。 問題的代碼,我hastt任何標籤只是不...問題代碼標籤?

http://8pic.ir/images/mrghe6ey1a8wkbxjefzw.png

現在我自己的標籤。 HTML代碼和樣式和我進入了圖片。但我想Mote ... 現在我該如何輸入HTML代碼和樣式,看起來像它上面:

這個錯誤檢查代碼? 這些代碼與選項卡相關。

http://Trainbit.com/files/1222191884/Tabs_Style_amp_HTML.txt

HTML:

<div class="list-wrap"> 
<div class="post-list"> 
<div class="img-box"> 
<img src="/<?php bloginfo('template_url'); ?>/image/1.png" /> 
        </div> 
        <div class="text-slider"> 
        <a href="#">Permalink to Post With Featured</a> 
        <br/> 
        2014 17 June 
        </div>     
</div> 
<div class="post-list"> 
<div class="img-box"> 
<img src="/<?php bloginfo('template_url'); ?>/image/1.png" /> 
        </div> 
        <div class="text-slider"> 
        <a href="#">Permalink to Post With Featured</a> 
        <br/> 
        2014 17 June 
        </div>     
</div> 
</div> 
<div class="post-list"> 
<div class="img-box"> 
<img src="/<?php bloginfo('template_url'); ?>/image/1.png" /> 
        </div> 
        <div class="text-slider"> 
        <a href="#">Permalink to Post With Featured</a> 
        <br/> 
        2014 17 June 
        </div>     
</div> 
</div> 

CSS:

.img-box{ 
    width:89px; 
    height:89px; 
    margin:10px 10px; 
    float:left; 
    padding-left:-5px; 
    } 
.img-box img{ 
    width:89px; 
    height:89px; 
    float:left; 
    } 
.text-slider{ 
    margin:10px; 
    font-size:11px; 
    float:right; 
    } 
.post-list a{ 
    text-decoration:none; 
    font-size:13px; 
    color:#7b7c7c; 
    float:right; 
    } 
.text-slider a:hover{ 
    color:#54d5d5; 
    } 

謝謝你,我會提交一個答案:)

+1

我假設英語不是你的第一語言;是否有可能讓一個有你所信任的英語語言能力的人用你的母語來回顧你的問題並看看他們能否提供更好的翻譯?事實上,我不知道問題是什麼。 –

+0

你希望你的每個列表條目能夠垂直堆疊,但是現在它們不正確地流動,並且對圖像做了奇怪的事情。我在跟蹤這個嗎? – ndm13

+0

嗨...對不起英文書寫不好...... – wirenab

回答

0

我想我得到了你的問題解決。你必須指定你的<div>的寬度和高度,以你想要的方式工作。看到這一點:http://jsfiddle.net/P6gkx/

HTML:

<div class="list-wrap"> 
    <div class="post-list"> 
     <div class="img-box"> 
      <img src="/<?php bloginfo('template_url'); ?>/image/1.png" /> 
     </div> 
     <div class="text-slider"> <a href="#">Permalink to Post With Featured</a> 

      <br/>2014 17 June</div> 
    </div> 
    <div class="post-list"> 
     <div class="img-box"> 
      <img src="/<?php bloginfo('template_url'); ?>/image/1.png" /> 
     </div> 
     <div class="text-slider"> <a href="#">Permalink to Post With Featured</a> 

      <br/>2014 17 June</div> 
    </div> 
</div> 
<div class="post-list"> 
    <div class="img-box"> 
     <img src="/<?php bloginfo('template_url'); ?>/image/1.png" /> 
    </div> 
    <div class="text-slider"> <a href="#">Permalink to Post With Featured</a> 

     <br/>2014 17 June</div> 
</div> 
</div> 

CSS:

.img-box { 
    width:89px; 
    height:89px; 
    margin:10px 10px; 
    float:left; 
    padding-left:-5px; 
} 
.img-box img { 
    width:89px; 
    height:89px; 
    float:left; 
} 
.text-slider { 
    margin:10px; 
    font-size:11px; 
    float:left; 
} 
.post-list a { 
    text-decoration:none; 
    font-size:13px; 
    color:#7b7c7c; 
    float:left; 
} 
.text-slider a:hover { 
    color:#54d5d5; 
} 

.post-list{ 
    width:310px; 
    display:block; 
    height:120px; 
    background-color:#ddd; 
    margin-bottom:5px; 
} 
+0

對於代碼的寬度和高度之後的列表的平衡感到抱歉? 例如,你寫道:.post-list { \t width:314px; \t height:110px; display:block; background-color:#ddd; margin-bottom:2px; } – wirenab

+0

本質上,你正在爲你的帖子製作一個盒子。在盒子可以達到它想要的那麼大之前,這是造成問題的原因。現在它具有尺寸,事情就可以適應他們應有的位置。 – ndm13

+0

再次,預先建立的框來定義寬度和高度,你不會再把我倒出來嗎? – wirenab