2012-01-06 5 views
0

이미지와 같이 가운데에 텍스트를 만들 수있는 방법이 궁금합니다.이미지 아래에 텍스트를 넣는 방법

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
    <title>Title</title> 
</head> 

<body> 
    <center> 
    <img src="http://www.wikima4.com/assets/templates/wikima4/css/images/red.jpg" width= 
    "1200" height="150" /> 
    </center> 

    <div align="justified"> 
    <font size="3" face="calibri">text text text text The quick brown fox jumps over the 
    lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over 
    the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps 
    over the lazy dog The quick brown fox jumps over the lazy dog<br /> 
    <br /> 
    You can download the documentation from this link: Download</font> 
    </div> 
</body> 
</html> 

답변

2

text-align:center;? <center>? margin:0 auto?

이것을 확인하십시오. http://jsfiddle.net/VnRRA/ 원하는 것이 맞습니까?

갱신 : 나는이었다 한 부모 DIV에게 ID centerize을주고 여러 이미지에 대해이 작업을 수행하기 위해 text-align:center;

+0

방금 ​​코드를 게시했습니다. 무슨 일이 일어 났는지 모르겠다. 내가 게시 한 것을 지웠다. – tintincutes

+0

중앙에 정렬 할 수 있습니까? – tintincutes

+0

CSS 필드에 centerize를 추가 한 것으로 나타났습니다. 텍스트 패드 만 html로 만들면 어떻게 될까요? 내 html 코드에 어디에서 추가해야합니까? – tintincutes

0

에 말했다 기본적으로 어떤 http://jsfiddle.net/VnRRA/1/

, 당신은 하나를 가진 테이블을 사용할 수 있습니다 행을 텍스트로, 이미지를 다른 행으로 이 방법을 사용하면 텍스트를 이미지 위나 아래에 배치 할 수 있습니다. 즉

<table> 
    <tr> 
     <td class="CSS Settings"> image 1 </td> 
     <td class="CSS Settings"> image 2 </td> 
     <td class="CSS Settings"> image 3 </td> 
    </tr> 
    <tr> 
     <td class="CSS Settings"> Text for image 1 </td> 
     <td class="CSS Settings"> Text for image 2 </td> 
     <td class="CSS Settings"> Text for image 3 </td> 
    </tr> 
</table> 
관련 문제