Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.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
Css 表单在chrome和IE6中未正确显示_Css_Internet Explorer 6 - Fatal编程技术网

Css 表单在chrome和IE6中未正确显示

Css 表单在chrome和IE6中未正确显示,css,internet-explorer-6,Css,Internet Explorer 6,这是我的页面。我需要在这里插入完整的代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" con

这是我的页面。我需要在这里插入完整的代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $('#tabs ul li:first a').addClass("active");
        $('#forms').find('form').hide().fadeIn(1500);
        $("#tabs ul li").click(function() {
            $("#tabs ul li").removeClass("active");
            $(this).addClass("active");
            $("#forms form").hide();
            var activeTab = $(this).find("a").attr("href");
            $(activeTab).fadeIn();
            return false; 
        });
    });
</script>
<style type="text/css">
* { margin:0; padding:0; }
body { background:#27476B; }
.clear { clear:both; }
#wrapper { width:510px; height:331px; overflow:hidden; padding:10px; }
#tabs ul { padding-left:15px; list-style:none; }
#tabs ul li { display:block; float:left; text-align:center; }
#tabs ul li a { padding:3px 20px 2px 20px; color:#fff; text-decoration:none; border-top:1px solid #ccc; border-left:1px solid #ccc; border-right:1px solid #ccc; }
#tabs ul li a:hover { background:#AEBAC1; } 
#tabs ul li a.active, #tabs ul li.active a:hover { background:#AEBAC1; color:#333; }
#forms form { background:#AEBAC1; border:2px solid #333; padding-left:5px; }
.twocol { display:block; float:left; width:250px; margin-bottom:10px; }
.twocol label { margin-top:.33em; display:block; width:240px;}
.twocol select, .twocol input[type="text"] { background:#456A87; color:#fff; display:block; width:240px; font-size:16px; }
.twocol span { padding:0 8px 0 5px; }
.search { width:500px; text-align:center; margin-bottom:5px; }
</style>
</head>

<body>
    <div id="wrapper">
        <div id="tabs">
            <ul>
                <li><a href="#properties">Properties</a></li>
                <li><a href="#developments">Developments</a></li>
                <li><a href="#agents">Agents</a></li>
            </ul>
        </div>
        <div class="clear"></div>
        <div id="forms">
        <!--
                Search Form for Properties
        -->
          <form id="properties" name="properties" method="post" action="">
          <div class="twocol">
              <label for="city">City:</label>
              <select name="city" size="1">
                <option>-</option><option>asdfadf</option><option>-</option>
              </select>

              <label for="bedrooms">Bedroom:</label>
              <select name="bedrooms" size="1">
                <option>-</option>
              </select>

              <label for="minprice">Minimum Price:</label>
              <select name="minprice" size="1">
                <option>-</option>
              </select>

              <label for="minarea">Minimum Area:</label>
              <select name="minarea" size="1">
                <option>-</option>
              </select>

              <label for="propertytype">Property Type:</label>
              <select name="propertytype" size="1">
                <option>-</option>
              </select>

          </div>
          <div class="twocol">
              <label for="location">Location:</label>
              <select name="location" size="1">
                <option>-</option>
              </select>

              <label for="addedwithin">Added Within:</label>
              <select name="addedwithin" size="1">
                <option>-</option>
              </select>

              <label for="maxprice">Maximum Price:</label>
              <select name="maxprice" size="1">
                <option>-</option>
              </select>

              <label for="maxarea">Maximum Area:</label>
              <select name="maxarea" size="1">
                <option>-</option>
              </select>

              <label for="searchfor">Search For:</label>
              <input name="searchfor" type="radio" value="sale" /><span>Sale</span>
              <input name="searchfor" type="radio" value="purchase" /><span>Purchase</span>
              <input name="searchfor" type="radio" value="rental" /><span>Rental</span>
          </div>
          <hr class="clear" /><br />
          <div class="search">
            <input type="submit" value="Search" />
          </div>
          </form>
        <!--
                Search Form for Developments
        -->
        <form id="developments" name="developments" method="post" action="">
            <div class="twocol">
                <label for="city">City:</label>
                <select name="city" size="1">
                    <option>-</option><option>asdfadf</option><option>-</option>
                </select>
            </div>
            <div class="twocol">
                <label for="developmentname">Development name:</label>
                <input type="text" name="developementname" />
            </div>
            <hr class="clear" /><br />
            <div class="search">
                <input type="submit" value="Search" />
            </div>
        </form>
        </div>
    </div>
</body>
</html>

无标题文件
$(文档).ready(函数(){
$('#tabs ul li:first a').addClass(“活动”);
$('#forms').find('form').hide().fadeIn(1500);
$(“#选项卡ul li”)。单击(函数(){
$(“#tabs ul li”).removeClass(“活动”);
$(此).addClass(“活动”);
$(“#表单”).hide();
var activeTab=$(this.find(“a”).attr(“href”);
$(activeTab.fadeIn();
返回false;
});
});
*{边距:0;填充:0;}
正文{背景:#27476B;}
.clear{clear:两者;}
#包装{宽度:510px;高度:331px;溢出:隐藏;填充:10px;}
#制表符ul{左侧填充:15px;列表样式:无;}
#选项卡ul li{显示:块;浮动:左;文本对齐:中心;}
#制表符ul li a{填充:3px 20px 2px 20px;颜色:#fff;文本装饰:无;边框顶部:1px实心#ccc;边框左侧:1px实心#ccc;边框右侧:1px实心#ccc;}
#选项卡ul li a:悬停{背景:#AEBAC1;}
#tabs ul li a.active,#tabs ul li.active a:悬停{背景:#AEBAC1;颜色:#333;}
#表单{背景:#AEBAC1;边框:2px实心#333;左填充:5px;}
.twocol{显示:块;浮点:左;宽度:250px;页边距底部:10px;}
.twocol标签{页边距顶部:.33em;显示:块;宽度:240px;}
.twocol选择.twocol输入[type=“text”]{背景:#456A87;颜色:#fff;显示:块;宽度:240px;字体大小:16px;}
.twocol span{padding:0 8px 0 5px;}
.search{宽度:500px;文本对齐:居中;页边距底部:5px;}
城市: -asdfadf- 卧室: - 最低价格: - 最小面积: - 属性类型: - 地点: - 添加到: - 最高价格: - 最大面积: - 搜索: 特价 购买 租金

城市: -asdfadf- 开发名称:

这是完美的视图(在Firefox上)

以下问题由我确定,如果还有其他问题,请告诉我

  • IE8和Chrome显示了一些额外的高度(显示了第二个表单的一小部分)
  • IE6未显示CSS中指定的宽度
  • 在IE6中,最初tabs div和forms div接触,但在它上面的鼠标增加了一些额外的间距。

  • 如何解决这个问题。

    我不知道你说的第1点和第2点是什么意思,但第3点我已经解决了。我可能已经修复了1和2(不确定)

    让我知道这对你是如何起作用的


    忘记IE6-@Calum:我忘记了IE6,我的客户没有忘记。因为他的电脑上有IE6,我想你的非活动表单首先需要有“显示:无”。这样它们就不会向外窥视,不管大小。此外,你还需要清除TABS div中的浮动。说实话,我对你成功地让IE6看起来和其他浏览器一样接近印象深刻。如果IE6兼容性是一项要求,网络开发人员现在应该至少收取100%的额外费用;这很好地反映了它会导致多少exta工作。@Spudley:我需要一些帮助来解决这个问题。@Alex:谢谢。我希望您在“ul”中添加了“显示:内联块”。好了。现在,第1点已被清除。现在只有第二点了。它说表单中使用的下拉框在新版本中被拉伸到240px的宽度。但是宽度的css在IE6中不起作用。解决办法可能是什么。请检查原始和IE6屏幕截图。添加此单独的.twocol select{width:240px;}它可能是atribute选择器干扰IE。更新: