【问题标题】:IE7 float (not div's)IE7 浮动(不是 div 的)
【发布时间】: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的版本)

哇,忘记链接了 http://site.amm.siedlce.pl/front/page/get/79/

【问题讨论】:

  • 您是否考虑过使用特定于 IE7 的样式表并使用条件 cmets 调用它?
  • 但我什至不知道如何在 IE7 中修复它

标签: internet-explorer-7 css-float


【解决方案1】:

IE7 不支持属性选择器input[type="submit"]

按类引用它们。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-08
    • 1970-01-01
    • 1970-01-01
    • 2013-01-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多