【发布时间】:2012-06-12 21:39:28
【问题描述】:
我想制作简单的表单,没有很棒的 div 和 CSS - 它的结构是这样的:
<form id="cform" action="/" method="post">
<fieldset>
<label class="first" for="name">Nazwa firmy: </label><input id="name" name="name" type="text" />
<label class="first" for="email">Email: </label><input id="email" name="email" type="text" />
</fieldset>
</form>
CSS
#cform input, #cform textarea, #cform label, #cform select
{
float: left;
}
label.first, #cform input[type="submit"]
{
margin-bottom: 10px;
width: 150px;
float: left;
clear: both;
}
#cform textarea
{
width: 400px;
height: 250px;
margin-bottom: 10px;
}
在 FF、IE8、Chrome 和 Opera 中看起来不错。但是在 IE7 中,输入看起来就像它们根本没有浮点数一样。如何解决? (请不要添加div的版本)
【问题讨论】:
-
您是否考虑过使用特定于 IE7 的样式表并使用条件 cmets 调用它?
-
但我什至不知道如何在 IE7 中修复它
标签: internet-explorer-7 css-float