我想让第一个输入的宽度为 100%,第二个 + 图像 = 100%,以便第二个输入在同一行上获得其余空间(100%-img 大小)。可以使用CSS吗?
<html><head><title>width test</title>
<style type="text/css">
.t {
width: 100%;
table-layout:fixed;
}
.caption {
text-align: left;
width: 35%;
}
.data {
text-align: left;
width: 65%;
}
.edt {
width: 100%;
}
</style>
</head>
<body>
<table class="t">
<tr>
<td class="caption">Caption:</td>
<td class="data"><input type="text" class="edt" /></td>
</tr>
<tr>
<td class="caption">Caption:</td>
<td class="data">
<input type="text" class="edt" /><a href="#"><img width="22px" src="cal.png" /></a>
</td>
</tr>
</table>
</body>
</html>