2012-12-18 4 views
0

나는 아주 간단한 html과 CSS 스타일로 작업 중이다. 나는 단락으로 이미지를 알기가 어렵다. 내 div 영역은 이미지와 같은 단락을 가지고 가정 :html : 문장을 이미지로 맞추기

<div> 
<img border="1" src="cake.jpg" width="100" height="70"> 
Tom's review: This is the best cake that I have ever had... 
</div> 

단락은 이미지의 "오른쪽 아래"에 표시하지만 나는 그것이 이미지의 "오른쪽 상단"에 출연 할 싶어요.

나는이 질문이 간단하다는 것을 알고 있지만 나는 HTML에 매우 익숙하다. 누구든지 여기에서 도울 수 있습니까?

감사합니다.

답변

2

이미지를 왼쪽으로 플로팅해야합니다.

<div> 
<img border="1" src="cake.jpg" width="100" height="70" style="float: left;"> 
Tom's review: This is the best cake that I have ever had... 
<div style="clear: both;"></div> 
</div> 
+0

고마워요! 그것은 작동합니다!. –

0

사용이 코드

<div> 
    <div style="float: left;"><img border="1" src="gtld-lifecycle.jpg" width="100" height="70"></div> 
<div style="float: left;">Tom's review: This is the best cake that I have ever had...</div> 
</div> 
0

당신이 문단 상단에 표시 할 경우 - 오른쪽 단락 뒤에 이미지를 넣어.

<div> 
    <p>Tom's review: This is the best cake that I have ever had...</p> 
    <img border="1" src="cake.jpg" width="100" height="70"/><br/> 
</div> 
관련 문제