论坛
标题:
百度页面练习为什么居中不了
[打印本页]
作者:
王素言
时间:
2017-11-16 20:03
标题:
百度页面练习为什么居中不了
老师,为什么我写的网页按照你讲课操作但是不论如何我插入的图片就是居右对齐,无法居中
作者:
lori棒棒糖
时间:
2017-11-17 17:12
把你的代码全部复制粘贴上来看下,肯定是代码有问题的
作者:
王素言
时间:
2017-11-21 19:29
lori棒棒糖 发表于 2017-11-17 17:12
把你的代码全部复制粘贴上来看下,肯定是代码有问题的
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>百度页面练习</title>
<style type="text/css">
body,td,th {
font-family: "微软雅黑";
font-size: 14px;
color: #212020;
text-align: right;
}
body {
background-color: #FFFFFF;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a:link {
color: #4D4B4B;
}
a:hover {
color: #0424DB;
}
a:visited {
color: #B30E11;
}
</style>
</head>
<body text="#414141">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td height="50" align="right"><a href="http://nuomi.com"><strong>糯米</strong></a> <a href="http://baidu.com"> <strong>新闻</strong></a> <a href="http://hao123.com" target="_blank"><strong>hao123</strong></a> <a href="http://map.baidu.com"><strong>地图</strong></a> <a href="#"><strong>视频 </strong></a> <a href="#"><strong>贴吧</strong></a> <a href="#"><strong> 登录</strong></a> <a href="3"><strong>设置</strong></a></td>
</tr>
<tr>
<td height="120" align="center" valign="bottom"><img src="image/baidu.jpg" width="222" height="85" alt=""/></td>
</tr>
<tr>
<td height="80" align="center" valign="bottom"><img src="image/baidu-so.jpg" width="650" height="44" alt=""/></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</tbody>
</table>
</body>
</html>
作者:
lori棒棒糖
时间:
2017-11-23 17:49
本帖最后由 lori棒棒糖 于 2017-11-23 17:50 编辑
把text-align: right去掉就可以了
欢迎光临 论坛 (http://bbs.qinxue.com/)
Powered by Discuz! X3.1