HTML表单中的按钮定位
这是我的HTML:HTML表单中的按钮定位,html,css,Html,Css,这是我的HTML: <tr> <td> <div class="fileinputs"> <input type="submit" name="submit" class="submit" /> </div> <div class="f
<tr>
<td>
<div class="fileinputs">
<input type="submit" name="submit" class="submit" />
</div>
<div class="fileinputs">
<input type="file" class="file" name="uploadedfile" />
<div class="fakefile">
<img src="uf_btt.png" />
</div>
</div>
<div class="fileinputs">
<input type="reset" class="reset" />
</div>
<div class="fileinputs">
<input type="button" class="print" onclick="window.print()" />
</div>
</td>
</tr>
因此,按钮是垂直放置的,一个在另一个下面。在IE中,只看到“上传文件”按钮。
我需要所有的按钮水平放置,一个挨着另一个,并且在所有浏览器中都保持一致。
我怎样才能得到呢?
谢谢大家! 您可能想了解。或者使用SPAN而不是div,或者使用带有“display:inline”样式的div谢谢!我用了“float:left”,它起作用了。唯一的问题仍然存在-IE仍然只显示一个按钮,而不是四个-“上传文件”。
div.fileinputs {
position: relative;
}
div.fakefile {
position: absolute;
top: 0px;
left: 0px;
z-index: 1;
}
input.file {
position: relative;
text-align: right;
-moz-opacity:0 ;
filter:alpha(opacity: 0);
opacity: 0;
z-index: 2;
}