2015-10-16 23 views
-4

我是CSS新手,所以請稍後。如何移動此HTML中的內容

請看看這個小提琴

http://jsfiddle.net/gn8fy3rc/3/

我想移動文本moneycontrol,圖像相對要顯示時間,文本內容旁邊。

我的代碼一些部分

<div class="column-a"> 
    <section class="widget"> 
     <h4 class="widget-title">Latest News</h4> 
     <div id="divRss"> 
     <ul class="feedEkList"> 
      <li> 
       <div class="itemTitle"><a href="http://www.moneycontrol.com/news/results-boardroom/attrition-to-peak-out-normalise-around-18-20-cyient_3627581.html" target="_blank">Attrition to peak out, normalise around 18-20%: Cyient</a></div> 
       <div class="itemDate"> 
        10/16/2015, 12:24 PM 
        <div class="Source">moneycontrol</div> 
        <div class="itemContent"><img src="http://www.moneycontrol.com/news_image_files/2015/c/Cyient_200.jpg" alt="Ajay Aggarwal" title="Ajay Aggarwal" border="0" width="75" height="75" hspace="5"> Seventy percent of the margin improvement basically came from rupee depreciation and rest from operational efficiencies and high margin jobs, said Ajay Aggarwal, Senior VP CFO, Cyient.</div> 
       </div> 
      </li> 
      <li> 
       <div class="itemTitle"><a href="http://www.moneycontrol.com/news/results-boardroom/expect-20-topline-growthfy16-sintex-industries_3626821.html" target="_blank">Expect 20% topline growth in FY16: Sintex Industries</a></div> 
       <div class="itemDate"> 
        10/16/2015, 11:11 AM 
        <div class="Source">moneycontrol</div> 
        <div class="itemContent"><img src="http://www.moneycontrol.com/news_image_files/2015/s/samir-joshipura-200.jpg" alt="Samir Joshipura" title="Samir Joshipura" border="0" width="75" height="75" hspace="5"> Samir Joshipura Group CEO, Sintex is confident of meeting the guidance of 20 percent topline growth in FY16 and margin growth between 50-100 basis points.</div> 
       </div> 
      </li> 

     </ul> 
     </div> 
    </section> 

    <!--widget--> 
</div> 

可否請你讓他們知道如何做到這一點

+0

爲什麼** **標籤'jquery'如果它是一個'CSS'問題? –

+0

你應該看看下面的技術:內嵌塊,浮動,彈性盒。他們都採用不同的方法來做同樣的事情。 –

+0

** [這是你想要的嗎?](http://jsfiddle.net/Guruprasad_Rao/gn8fy3rc/5/)** –

回答

-1

製造日期和源標籤是在同一水平上,選擇一個內聯元素,而不是塊,他們似乎互相

<li> 
    <div class="itemTitle"><a href="http://www.moneycontrol.com/news/results-boardroom/expect-20-topline-growthfy16-sintex-industries_3626821.html" target="_blank">Expect 20% topline growth in FY16: Sintex Industries</a></div> 
    <div class="itemDetail"> 
     <span class="itemDate">10/16/2015, 11:11 AM</span> 
     <span class="Source">moneycontrol</span> 
     <div class="itemContent"><img src="http://www.moneycontrol.com/news_image_files/2015/s/samir-joshipura-200.jpg" alt="Samir Joshipura" title="Samir Joshipura" border="0" width="75" height="75" hspace="5"> Samir Joshipura Group CEO, Sintex is confident of meeting the guidance of 20 percent topline growth in FY16 and margin growth between 50-100 basis points.</div> 
    </div> 
</li> 
+0

非常感謝。 – Pawan

0

純CSS解決方案的旁邊:

.itemContent { display: flex; } 
.itemContent > img { min-width: 75px; } 
.itemDate > .Source { display: inline-block; } 

(因爲多數民衆贊成你標記..問題)

jsfiddle