2016-11-21 22 views
-2

Pic of Uneven text如何均勻排列/縮進此文字?

<img src="https://maxcdn.icons8.com/iOS7/PNG/25/Business/pricing_structure-25.png" title="Pricing Structure" width="25" style="margin-right: 8px"> 
 
Choose ones of our packages or build your own. Choose ones of our packages or build your own. <a href="pricing.html">View pricing.</a>

+0

你可以修改HTML嗎? – j08691

+0

你想縮進什麼? – Oriol

回答

0

包裹一個div元素裏面的內容和應用,我在下面的.hang風格列出的CSS代碼。

HTML

<div class="hang"> 
    <img src="https://maxcdn.icons8.com/iOS7/PNG/25/Business/pricing_structure-25.png" title="Pricing Structure" width="25" style="margin-right: 8px"> 
    Choose ones of our packages or build your own. Choose ones of our packages or build your own. 

    <a href="pricing.html">View pricing.</a> 
    </div> 

CSS

.hang { 
    text-indent: -2.3em; 
    margin-left: 3em; 
} 

工作實施例

https://jsfiddle.net/nickcpainter/7vuh2f6k/

+0

爲什麼downvote?祝你好運,獲得答案,如果你只是downvote沒有反饋... – Nick

+0

Downvote?我沒有倒下任何東西。我剛剛打開並看到您的評論。無論如何,在你的jsfiddle中,第一行與其他行不一致。我想我可能需要將圖像放在一個欄中,而文本則放在另一欄中。 –

+0

@RichardMartinez檢查陪伴伴侶。 –