我想知道如何让文字像图片一样居中。
<!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>
最佳答案
text-align:center;
?
<center>
?
margin:0 auto
?
看看这个。 http://jsfiddle.net/VnRRA/这是你想要的吗?
更新:http://jsfiddle.net/VnRRA/1/
基本上我所做的是,给父 div 一个 id centerize
并告诉它 text-align:center;
关于html - 怎么把文字放在图片下面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8755688/