这样的一个问题样式怎么写?
<td width="13%" align="center"><input name="Input" type="checkbox" value="" />AAA</td>
<td width="13%" align="center">AAA</td>
这是两个TD 有的有checkbox有的没有 我现在想要文字部分AAA居中对齐
请问改怎么写?
[解决办法]
你已经给td添加了center,可以在添加一个css来控制checkbox,让他左浮动。
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
input{
float:left;
}
</style>
</head>
<body>
<table width="100%">
<tbody>
<tr>
<td width="13%" align="center"><input name="Input" type="checkbox" value="" style="margin-left:-20px"/>AAA</td>
</tr>
<tr>
<td width="13%" align="center">AAA</td>
</tr>
</tbody>
</table>
</body>
</html>