Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在IE中,浮动元素低于UL中的浮动输入-但它';它的铬色很好_Html_Css_Internet Explorer_Css Float - Fatal编程技术网

Html 在IE中,浮动元素低于UL中的浮动输入-但它';它的铬色很好

Html 在IE中,浮动元素低于UL中的浮动输入-但它';它的铬色很好,html,css,internet-explorer,css-float,Html,Css,Internet Explorer,Css Float,我已经为此工作了大约一个小时了,我无法确定为什么这会发生在IE中 我有以下HTML来显示我的注册表(摘录): 由于某种原因,当我希望字段并排显示时,显示的div.register\u field\u errortoop提示元素正在下降到我的input字段下面 它在Chrome中运行良好,在我的ul中有足够的宽度来容纳工具提示(670px),但我必须将ul调整为宽度:733px或更大,以使它们在IE中并排出现 代码是,只需单击“注册”而不填写任何输入元素,每个输入元素都会显示工具提示 就好像UL上

我已经为此工作了大约一个小时了,我无法确定为什么这会发生在IE中

我有以下HTML来显示我的注册表(摘录):

由于某种原因,当我希望字段并排显示时,显示的
div.register\u field\u error
toop提示元素正在下降到我的
input
字段下面

它在Chrome中运行良好,在我的
ul
中有足够的宽度来容纳工具提示(670px),但我必须将
ul
调整为
宽度:733px
或更大,以使它们在IE中并排出现

代码是,只需单击“注册”而不填写任何输入元素,每个输入元素都会显示工具提示

就好像UL上有一些右手边的填充物,但我试过在UL上测试
margin:0
padding:0
,但没有成功

当我让IE11模拟IE7时,这个问题似乎正在发生。我希望该网站在IE7中工作


我不再使用浮点数,它们对于总体布局来说是一个不必要的缺点。使用浮动将浮动的元素从文档流中移除,而不这样做就可以很容易地实现浮动元素

我现在正在使用
display:inline block
display:table
进行布局,例如我提供的示例


我已经完全去除了CSS中的“float”和“clear”,除了我可能需要一些文本环绕图像的时候。我很确定这就是
float
最初的目的。

?请查看我添加到问题中的屏幕截图。这也是IE11中的吗?我链接的屏幕截图来自Windows 8.1上的IE11,它与IE9仿真看起来也一样。我的“文档模式”设置为7,因为它说它是默认的:/。这不是正确的设置吗?如果我将它设置为“Edge”,它看起来很好。Edge是“IE11”模式。这似乎是IE7的一个问题。
<ul id="register_form_list">
    <li><label for="register_full_name" class="register_label">Full Name</label></li>
    <li class="input_wrapper">
        <input type="text" class="register_text_input" name="full_name" id="register_full_name" value="">
        <div class="register_field_help">
            <span class="register_field_error_text" style="display: none">Enter your first and last name</span>
        </div>
            <div class="register_field_error">
        <span class="register_field_error_text">Please enter your full name</span>
    </div>
    </li>
</ul>
ul#register_form_list { float: left; clear: left; margin: 25px 0 0 29px; width: 670px; }
ul#register_form_list li { float: left; clear: left; display: inline; margin-left:0px; }
ul#register_form_list li.input_wrapper { padding: 0 0 15px 0; }
label.register_label { float: left; font-size: 0.9em; font-weight: bold; color: #093C5D; text-decoration: none; }
ul#register_form_list input.register_text_input { float: left; clear: left; margin: 6px 0 0 0; padding: 5px; width: 260px; border: #B0B0B0 1px solid; background: #FFFFFF url(images/quizmaker/field_shadow_bg.png) repeat-x; background-position: top; outline: none; font-family: Arial, sans-serif; }
ul#register_form_list input.register_submit { float: left; clear: left; margin: 0 0 0 0; padding: 5px 14px 5px 14px; }
div.register_field_help { float: left; display: none; margin: 0 0 0 6px; width: 386px; height: 39px; background: url(images/welcome/register_text_help.png) top left no-repeat; }
span.register_field_help_text { float: left; margin: 10px 0 0 20px; color: #FFFFFF; }
div.register_field_error { float: left; margin: 0 0 0 6px; width: 386px; height: 39px; background: url(images/welcome/register_text_error.png) top left no-repeat; }
span.register_field_error_text { float: left; margin: 10px 0 0 20px; color: #FFFFFF; }