我想使第一个输入的宽度为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>
不幸地我这个外部表结构是固定取出
table-layout:fixed;
和width: 35%;
,所以我不能这样做( – Artem 2009-07-18 05:39:43