一段CSS在IE里可以正常显示,在其它浏览器里不正常_html/css_WEB-ITnose

php中文网
发布: 2016-06-24 11:56:02
原创
1349人浏览过

   大致是这样的,我在头部的一个DIV里面放入一个log,之后加入菜单(与LOG并列的),每个菜单给一个背景图片。
但是显示出来的结果菜单文字总是移位了,没有显示在他的背景图片下面,跑后面去了。而背景图片的显示也不正常,我设置的1200的分辨率,在1024*768下面,前面有一部分背景图片显示不出来,便是整个窗体又是有滚动条的。求高看看。

<div class="Head" style=" width:1200px; height:84px; margin:0; padding:0;"">        <div class="mlog" style=" width:344px; height:84px;background-image:url(../images/mlog.jpg); float:left"></div>        <div class="menu" style=" width:640px; height:84px; float:left; ">                <ul style=" width:640px;height:84px;float:left; margin:0; padding:0">                <li style=" width:80px; height:84px;background-image:url(../images/m1.jpg);float:left;"><a  href="about.asp" ><%=Nav_2%></a></li>                <li style=" width:80px; height:84px;background-image:url(../images/m2.jpg);float:left;"><a  href="kctx.asp" <%if uid<>3 then response.Write"" else response.Write"class=""select"""%> ><%=Nav_3%></a></li>                <li style=" width:80px; height:84px;background-image:url(../images/m3.jpg);float:left;"><a  href="team.asp" <%if uid<>4 then response.Write"" else response.Write"class=""select"""%> ><%=Nav_4%></a></li>                <li style=" width:80px; height:84px;background-image:url(../images/m4.jpg);float:left;"><a  href="news.asp" <%if uid<>5 then response.Write"" else response.Write"class=""select"""%> ><%=Nav_5%></a></li>                <li style=" width:80px; height:84px;background-image:url(../images/m5.jpg);float:left;"><a  href="xyhd.asp" <%if uid<>6 then response.Write"" else response.Write"class=""select"""%> ><%=Nav_6%></a></li>                <li style=" width:80px; height:84px;background-image:url(../images/m6.jpg);float:left;"><a  href="jzsq.asp" <%if uid<>7 then response.Write"" else response.Write"class=""select"""%> ><%=Nav_7%></a></li>                <li style=" width:80px; height:84px;background-image:url(../images/m7.jpg);float:left;"><a  href="ydh.asp" <%if uid<>8 then response.Write"" else response.Write"class=""select"""%> ><%=Nav_8%></a></li>                <li style=" width:80px; height:84px;background-image:url(../images/m8.jpg);float:left;"><a  href="about.asp" <%if uid<>10 then response.Write"" else response.Write"class=""select"""%> ><%=Nav_8%></a></li>                </ul>        </div>         <div class="ser" style=" width:216px;background-image:url(../images/mlink.jpg); overflow:hidden; height:84px; line-height:19px;"><a onclick="SetHome(window.location)" href="javascript:void(0)" style="color:Red;">设为首页</a><a>|</a><a onclick="AddFavorite(window.location,document.title)" href="javascript:void(0)" style="color:Red;">加入收藏</a><a>|</a><a  href="contact.asp" style="color:Red;">联系我们|</a>        </div>   </div>
登录后复制


回复讨论(解决方案)

有没有人回一下啊。。

使用TABLE吧,用TABLE不会存在这个问题

你最好把你的代码从项目里抽出来单独测试下,也可以发上来,我们帮你看看问题,你发上来的只是一段代码,我们也不好测试,光看很难看出问题.


后面加个overflow:hidden

另外注意你的结尾多了个引号padding:0; "">
HTML速学教程(入门课程)
HTML速学教程(入门课程)

HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号