2010-12-31 4 views

答えて

1
<div style="width:50px; display: inline-block;"> 
<img src="http://assets.devx.com/MS_Azure/azuremcau.jpg" alt="blah" width="70" height="70" /> 
</div> 

<div style="width:150px; display: inline-block"> 
    <h2>Here is some text</h2> 
</div> 

変更フロート:インラインブロック:表示するには、左。これは、ドキュメントフローからアイテムを削除しないため、より良い解決策です。あなたがすべての1つのための幅を指定することを確認してください。

+0

私がそうすると、テキストが画像の下に表示されます(Googleクロムを使用) – CrustyApple

+0

上記の編集を参照してください – sethvargo

+0

この作品はあなたのためにありましたか? – sethvargo

0
<div style="float: left; margin-right: 10px;"> 
    <img src="http://assets.devx.com/MS_Azure/azuremcau.jpg" alt="blah" width="70" height="70" /> 
</div> 
<div style="width: 300px;"> 
    <h2>Here is some text</h2> 
</div> 
<br style="clear: both;" /> 

これは動作するはずです。

関連する問題