开发者

IE7 float (not div's)

开发者 https://www.devze.com 2023-01-10 11:47 出处:网络
I wanted to make simple form, without awesome div\'s and CSS - it structure is like: <form id=\"cform\" action=\"/\" method=\"post\">

I wanted to make simple form, without awesome div's and CSS - it structure is like:

<form id="cform" action="/" method="post">
<fieldset&g开发者_JAVA技巧t;
<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;
}

In FF, IE8, Chrome and Opera it looks good. But in IE7 inputs are looking, like they don't have float at all. How to fix it? (version without adding divs please)

Aww, forgot link http://site.amm.siedlce.pl/front/page/get/79/


IE7 doesn't support the attribute selector, input[type="submit"].

Reference them by class.

0

精彩评论

暂无评论...
验证码 换一张
取 消