基本的line-height
に、画像を左にフロートし、リンクを左にフロートしてから、次の<h3>
タグのフロートをクリアします。この部分を次のように変更します。
<!-- Dont forget to close your image tag. -->
<img src="http://i46.tinypic.com/2ly6hc4.png" width="24px" height="19px"/>
<a href="#" class="flw-link"> Follow Us</a>
<!-- Added class .flw-link to Follow us link -->
今あなたのCSSで:
/* Float the image and link to the left */
.twitter-feed img{float: left;}
/* Set the line-height of the text to center vertically to the image */
.twitter-feed .flw-link{float: left; line-height: 21px;}
/* Finally, clear your floats on the next tweet header */
.twitter-feed h3{clear: both;}
このjsfiddleをチェックしてください:http://jsfiddle.net/Fn4vP/25/
0
テキストを一番上に配置する行の高さを変更するオプションが必要なため、このようにして両方の要素をフロートします。次に、line-height を使用して、テキストが垂直方向に配置される正確な場所をピクセルで制御できます。