在IE6上正常,到了IE7,360急速、360兼容都出错

pfworld 2013-06-07 06:30:46
在IE6上正常,到了IE7,360急速、360兼容都出错!底部bottom不显示到底部,中部内容center显示不全,要不就显示全,底部跑中间了,怎么调都不行,以前是做CS的,帮朋友做网页就是出错,寻求帮助!



@charset "utf-8";
/* CSS Document */


body {
margin: 0px;
padding: 0px;
font-size: 12px;
background-color: #FFF;
}
.side {
float: left;
width: 40px;
background-image: url(../images/Index_02.gif);
background-repeat: repeat-x;
height: 50px;
display: block;
}
#Main #content #top {
width: 908px;
background-color: #FFF;
height: 161px;
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-right-color: #cccccc;
border-left-color: #cccccc;
background-image: url(../images/Index_06.gif);
background-repeat: repeat-x;
}
#Main #content #top img {
float: left;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
}
#Main #content #top #top_1 {
float: left;
width: 739px;
}

#Main #content #top #top_1 h2 {
float: left;
margin: 0px;
height: 75px;
background-image: url(../images/Index_09.gif);
background-position: left bottom;
width: 369px;
background-repeat: no-repeat;
text-indent: -9999px;
}
#Main #content #top #top_1 ul {
float: right;
margin-top: 17px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 8px;
}
#Main #content #top #top_1 ul li {
width: 70px;
float: left;
list-style-position: inside;
}

#Main #content #top #menu_1 {
float: left;
padding-top: 5px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 12px;
width: 727px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: solid;
border-left-color: #cccccc;
height: 68px;
margin-top: 13px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
#Main #content #top #menu_1 ul {
list-style-type: none;
margin: 0px;
padding: 0px;
display: inline;
width: 500px;
overflow: hidden;
}
#Main #content #top #menu_1 ul li {
height: 39px;
float: left;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 1px;
display: inline;
}
#Main #content #top #menu_1 ul li .menu {
display: block;
text-indent: -9999px;
height: 39px;
width: 71px;
}

#Main #content #top #menu_1 ul #menu_1_1 {
background-image: url(../images/menu_1.gif);
}
#Main #content #top #menu_1 ul #menu_1_2 {
background-image: url(../images/menu_2.gif);
}
#Main #content #top #menu_1 ul #menu_1_3 {
background-image: url(../images/menu_3.gif);
}
#Main #content #top #menu_1 ul #menu_1_4 {
background-image: url(../images/menu_4.gif);
}
#Main #content #top #menu_1 ul #menu_1_5 {
background-image: url(../images/menu_5.gif);
}
#Main #content #top #menu_1 ul #menu_1_6 {
background-image: url(../images/menu_6.gif);
}
#Main #content #top #menu_1 ul #menu_1_7 {
background-image: url(../images/menu_7.gif);
}
#Main #content #top #menu_1 ul #menu_1_8 {
background-image: url(../images/menu_8.gif);
}

#Main #content #top #menu_1 ul li ul {
margin: 0px;
padding: 0px;
display: none;
float: left;
position: absolute;
list-style-type: none;
white-space: nowrap;
overflow: hidden;
}

#Main #content #top #menu_1 ul li ul li {
float: left;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 5px;
overflow: hidden;
display: inline;
line-height: 26px;
}
#Main #content #center
{
position: relative;
z-index: 1;
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-right-color: #cccccc;
border-left-color: #cccccc;
}
#Main #content #bottom
{
z-index: 3;
height: 132px;
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-right-color: #cccccc;
border-left-color: #cccccc;
background-repeat: repeat-x;
background-position: top;
}
#Main #content #bottom #bottom_1 {
width: 168px;
height: 95px;
background-image: url(../images/Index_57.gif);
background-repeat: repeat-x;
float: left;
display: inline;
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: none;
border-right-color: #cccccc;
overflow: hidden;
}
#Main #content #bottom #bottom_1 img {
padding: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 52px;
}
#Main #content #bottom #bottom_3 {
float: right;
height: 132px;
width: 739px;
background-image: url(../images/Index_59.gif);
background-repeat: repeat-x;
}
#Main #content #bottom #bottom_3 ul {
padding: 0px;
list-style-type: none;
margin-top: 13px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 13px;
}
#Main #content #bottom #bottom_3 ul li {
display: inline;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 5px;
}
#Main #content #bottom #bottom_3 p {
padding: 0px;
margin-top: 15px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 17px;
line-height: 10px;
}





#content {
float: left;
width: 910px;
overflow: hidden;
}


#Main {
margin-right: auto;
margin-left: auto;
width: 990px;
}

A:link {TEXT-DECORATION: none; color:#000}
A:visited {TEXT-DECORATION: none; color:#000}
A:hover {TEXT-DECORATION: underline; color:#000}
A:active {TEXT-DECORATION: none; color:#000}

...全文
323 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
ycproc 2013-06-09
  • 打赏
  • 举报
回复
个人认为你应该考虑IE7以上版本,IE6不用管兼容,直接提示用户升级得了。
kiss筱魔 2013-06-08
  • 打赏
  • 举报
回复
引用 13 楼 pfworld 的回复:
[quote=引用 11 楼 ailiku1988 的回复:]
什么意思呀?[/quote] 怎么不仔细看呢,没看中间多了一行清除浮动的div
天下如山 2013-06-08
  • 打赏
  • 举报
回复
记得清除浮动.
pfworld 2013-06-08
  • 打赏
  • 举报
回复
引用 15 楼 liuchaolin 的回复:
为什么总有人喜欢用母板页呢?开发快吗? 母板页对于html来说是一个败笔之作,我现在基本上弃用了,拿用户控件来替代它的方式
感谢指点!WEB开发很陌生!
Ho_Johnson 2013-06-08
  • 打赏
  • 举报
回复
CSS兼容问题,浮动要清楚或合并浮动
md5e 2013-06-08
  • 打赏
  • 举报
回复
为什么总有人喜欢用母板页呢?开发快吗?

母板页对于html来说是一个败笔之作,我现在基本上弃用了,拿用户控件来替代它的方式

马老虎 2013-06-08
  • 打赏
  • 举报
回复
果断的使用Table把它弄下去。。

<!--这是CSDN底部的样式 参考下-->
.pub_footerall {
clear: both;
width: auto;
overflow: hidden;
margin: 10px auto;
padding: 0;
border-top: 1px solid #ccc;
color: #333;
font: normal 12px/24px Helvetica, Tahoma, Arial, sans-serif;
text-align: center;
}
pfworld 2013-06-08
  • 打赏
  • 举报
回复
引用 11 楼 ailiku1988 的回复:
什么意思呀?
跳动de指尖 2013-06-08
  • 打赏
  • 举报
回复
kiss筱魔 2013-06-08
  • 打赏
  • 举报
回复
pfworld 2013-06-08
  • 打赏
  • 举报
回复
引用 8 楼 sp1234 的回复:
看你们的代码,就知道这是多么古老的写法了。 你打开最近3年流行的高速网站看看,布局是运行时由javascript动态产生的,所以根本不避讳<table>。布局不是你在静态页面上用css一点点死板地“调”、甚至像你这样写上了坑爹的px像素坐标、而写死了的。 看你的代码,你写死了。
感谢你的指导!发现就是写死了!这个CSS是原来朋友写的!我还不如他!所以看了半天也没有找到问题所在!
kiss筱魔 2013-06-08
  • 打赏
  • 举报
回复
在结束div标签上面加<div style="clear:both"></div>这种情况是你的div有float,你需要在这样的外层div技术标签上面加这一句清楚浮动
  • 打赏
  • 举报
回复
看你们的代码,就知道这是多么古老的写法了。 你打开最近3年流行的高速网站看看,布局是运行时由javascript动态产生的,所以根本不避讳<table>。布局不是你在静态页面上用css一点点死板地“调”、甚至像你这样写上了坑爹的px像素坐标、而写死了的。 看你的代码,你写死了。
  • 打赏
  • 举报
回复
想要稳定和非常准确、自动化地排版,可以学习如何用好table,而不是css。
  • 打赏
  • 举报
回复
引用 5 楼 pfworld 的回复:
[quote=引用 3 楼 xiaojie_cp 的回复:] 首先你这是制作的事,和程序没关系。再者360本身就是IE的内核,你调一下IE的兼容。
如何设置兼容呀,有没有事例,WEB开发只会写代码![/quote] 不要折腾这类东西。你难道随叫随到地跑过去给客户一台台机器去设置?
pfworld 2013-06-07
  • 打赏
  • 举报
回复
引用 3 楼 xiaojie_cp 的回复:
首先你这是制作的事,和程序没关系。再者360本身就是IE的内核,你调一下IE的兼容。
如何设置兼容呀,有没有事例,WEB开发只会写代码!
pfworld 2013-06-07
  • 打赏
  • 举报
回复
引用 2 楼 dongxinxi 的回复:
不想跑中间的,加上clear:both
不行呀!我的底部还是跑中间了,如果中部添加内容不超过基本设置就好着,一旦超过就出错,特别是放几个图片,就不行!
lovebaby 2013-06-07
  • 打赏
  • 举报
回复
首先你这是制作的事,和程序没关系。再者360本身就是IE的内核,你调一下IE的兼容。
  • 打赏
  • 举报
回复
不想跑中间的,加上clear:both
pfworld 2013-06-07
  • 打赏
  • 举报
回复
这里我怎么调都不行,应该是CSS设置问题!

#Main #content #center
{
    position: relative;
    z-index: 1;
    border-top-width: 0px;
    border-right-width: 1px;
    border-bottom-width: 0px;
    border-left-width: 1px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: none;
    border-left-style: solid;
    border-right-color: #cccccc;
    border-left-color: #cccccc;
}
#Main #content #bottom
{
    z-index: 3;
    height: 132px;
    border-top-width: 0px;
    border-right-width: 1px;
    border-bottom-width: 0px;
    border-left-width: 1px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: none;
    border-left-style: solid;
    border-right-color: #cccccc;
    border-left-color: #cccccc;
    background-repeat: repeat-x;
    background-position: top;
}


<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterWebSite.master.cs"
    Inherits="ICWebSite.Web.MasterWebSite" %>

<!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">
<!-- InstanceBegin template="/Templates/tpl.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <meta http-equiv="Content-Language" content="zh-CN" />
    <meta http-equiv="Page-Enter" content="revealTrans(duration=20,transtion=6)" />
    <meta http-equiv="Page-Exit" content="revealTrans(duration=20,transtion=6)" />
    <meta name="keyword" content='<%=this._root.SelectSingleNode("KeyWord").InnerText %>' />
    <meta name="description" content='<%=this._root.SelectSingleNode("Description").InnerText %>' />
    <title>
        <%=this._root.SelectSingleNode("Title").InnerText %></title>
    <%--    <script type="text/javascript">
        function MM_openBrWindow(theURL, winName, features) {
            window.open(theURL, winName, features);
        }
    </script>--%>
    <!-- InstanceEndEditable -->
    <link href="css/sytle.css" rel="stylesheet" type="text/css" />

    <script src="script/jquery-1.4.1.min.js" type="text/javascript"></script>

    <script src="script/script_index.js" type="text/javascript"></script>

    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <div id="Main">
        <div class="side">
        </div>
        <div id="content">
            <div id="top">
                <a href="index.aspx">
                    <img src="images/Index_Logo_1.gif" alt="XXXX" /></a>
                <div id="top_1">
                    <h2>
                        XXXX有限责任公司</h2>
                    <ul>
                        <li><a href="index.aspx">返回首页</a></li>
                        <li><a href="javascript:window.external.AddFavorite('http://www.XXX.com', 'XX网站')">收藏本站</a></li>
                    </ul>
                </div>
                <div id="menu_1">
                    <ul id="menu">
                        <li id="menu_1_1"><a class="menu" href="intro.aspx">企业简介</a>
                            <ul id="menu_1_1_ul">
                                <li><a href="intro.aspx">公司简介</a> |</li>
                                <li><a href="history.aspx">历史沿革</a> |</li>
                                <li><a href="framework.aspx">企业架构</a> |</li>
                                <li><a href="honor.aspx">资质荣誉</a> |</li>
                                <li><a href="cluture.aspx">企业文化</a></li>
                            </ul>
                        </li>
                        <li id="menu_1_2"><a class="menu" href="product.aspx">产品展示</a>
                            <ul id="menu_1_2_ul">
                                <asp:Repeater ID="RepProductClass" runat="server">
                                    <ItemTemplate>
                                        <li><a href='Product.aspx?id=<%#Eval("ID") %>'>
                                            <%#Eval("name").ToString()%></a> |</li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </li>
                        <li id="menu_1_8"><a class="menu" href="quality.aspx">质量管理</a>
                            <ul id="menu_1_8_ul">
                                <li><a href="quality.aspx">质量管理</a> |</li>
                                <li><a href="facility.aspx">生产设施</a> |</li>
                                <li><a href="materials.aspx">产业用料</a> |</li>
                                <li><a href="examination.aspx">产品检验</a></li>
                            </ul>
                        </li>
                        <li id="menu_1_3"><a class="menu" href="news.aspx">企业动态</a>
                            <ul id="menu_1_3_ul">
                                <asp:Repeater ID="RepNewsType" runat="server">
                                    <ItemTemplate>
                                        <li><a href='News.aspx?NewsClassID=<%#Eval("ID") %>'>
                                            <%#Eval("name").ToString()%></a> |</li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </li>
                        <li id="menu_1_4"><a class="menu" href="sale.aspx">销售网点</a>
                            <ul id="menu_1_4_ul">
                                <li><a href="#">专卖店</a> |</li>
                                <li><a href="sale.aspx">销售点</a> |</li>
                                <li><a href="#">超市</a></li>
                            </ul>
                        </li>
                        <li id="menu_1_7"><a class="menu" href="service.aspx">客户服务</a></li>
                        <li id="menu_1_5"><a class="menu" href="about.aspx">联系我们</a></li>
                        <li id="menu_1_6"><a class="menu" href="careers.aspx">招贤纳士</a></li>
                    </ul>
                </div>
            </div>
            <!-- InstanceBeginEditable name="Content" -->
            <div id="center">
                <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                </asp:ContentPlaceHolder>
            </div>
            <!-- InstanceEndEditable -->
            <div id="bottom">
                <div id="bottom_1">
                    <img alt="XXXX" src="images/Index_Logo_2.gif" />
                </div>
                <div id="bottom_3">
                    <ul>
                        <li><a href="Index.aspx">首页</a> | </li>
                        <li><a href="intro.aspx">企业简介</a> |</li>
                        <li><a href="product.aspx">产品展示</a> |</li>
                        <li><a href="news.aspx">企业动态</a> |</li>
                        <li><a href="sale.aspx">销售网点</a> |</li>
                        <li><a href="about.aspx">联系我们</a> |</li>
                        <li><a href="zhaopin.aspx">招贤纳士</a> </li>
                    </ul>
                    <p>
                        <%=this._root.SelectSingleNode("Copyright").InnerText%>   <%=this._root.SelectSingleNode("Number").InnerText%>   XXX有限责任公司</p>
                    <br />
                    <p>
                        公司地址:XXX</p>
                </div>
            </div>
        </div>
        <div class="side">
        </div>
    </div>
    </form>
</body>
<!-- InstanceEnd -->
</html>

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧