2010-12-31 6 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> 

변경된 플로트 : 인라인 블록 : 디스플레이 왼쪽. 이는 문서 플로우에서 항목을 제거하지 않기 때문에 더 나은 솔루션입니다. 각 너비에 대한 너비를 지정했는지 확인하십시오.

+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;" /> 

이렇게하면됩니다.

관련 문제