问个关于ie8的问题,很急,先谢谢了

hebsxl2000 2012-08-23 08:49:35
项目在ie8上启动的时候,浏览器模式是ie8 ,而文档模式 则是 杂项,
页面效果就不正常,如果把文档模式换成ie8标准就好了,这个是为什么导致的呢?
我贴一个jsp页面吧
谢谢大家


<%@ page language="java" contentType="text/html; charset=gb2312"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="/tags/app" prefix="app" %>
<html:html locale="true">
<%
String funcCode = request.getParameter("funcCode");
if (funcCode != null && funcCode.length() != 0) {
session.setAttribute("funcCode", funcCode);
} else {
funcCode = (String) session.getAttribute("funcCode");
}
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path;
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
<title>个人工作区</title>
<link href="../../nresources/default/portal.css" rel="stylesheet" type="text/css" >
<script type="text/javascript" src="../../njs/jquery/jquery13.pack.js"></script>
<script type="text/javascript" src="../../njs/jquery/ui16rc5.packed.js"></script>
<script type="text/javascript" src="../../njs/jquery/contextmenu.r2.js"></script>
<script type="text/javascript" src="../../njs/ui/portal.js"></script>
<script type="text/javascript" src="../../js/swfobject.js"></script>
<script type="text/javascript">

</script>

</head>
<body >
<div class="widget">
<div class="item-col col-1">
<div id="w1" class="item">
<div class="caption">
<div class="text">反映问题</div>
<div class="option">
</div>
</div>
<div class="content autoscrolX">
<!-- 在这里填入你们想要的内容 cellpadding="0" cellspacing="0" is a must, but no need for 100% width-->

<iframe align="top" id="ifram" frameborder="0" scrolling="auto" src="<%=basePath %>/mas_page/system/personwork/personwork.do?method=problem_list" width="100%" height="170px" ></iframe>

</div>
</div>
<div id="w3" class="item">
<div class="caption">
<div class="text">政策咨询</div>
<div class="option">
</div>
</div>
<div class="content autoscrolX">
<div>
<iframe align="top" id="ifram" frameborder="0" scrolling="auto" src="<%=basePath %>/mas_page/system/personwork/personwork.do?method=policy_cons_list" width="100%" height="150px" ></iframe>
</div>
</div>
</div>
</div>
<div class="item-col col-2">
<div id="w4" class="item">
<div class="caption">
<div class="text">调研统计</div>
<div class="option">
</div>
</div>
<div class="content autoscrolX">
<div>
<iframe align="top" id="ifram" frameborder="0" scrolling="no" src="<%=basePath %>/mas_page/survote/chart4.jsp?id=1" width="100%" height="170px" ></iframe>
</div>
</div>
</div>
<div id="w5" class="item">
<div class="caption">
<div class="text">政策反馈</div>
<div class="option">
</div>
</div>
<div class="content autoscrolX">
<div>
<iframe align="top" id="ifram" frameborder="0" scrolling="auto" src="<%=basePath %>/mas_page/system/personwork/personwork.do?method=findPolicyRevertAmount" width="100%" height="150px" ></iframe></div>
</div>
</div>




</div>
<div class="clear"></div>

</div>

</body>

</html:html>


...全文
285 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
咖啡加糖_ 2013-03-18
  • 打赏
  • 举报
回复
引用 5 楼 hebsxl2000 的回复:
谢谢大家 问题解决了 这个是个比较老的项目了 后来改版之后页面用iframe布局了 最外层的jsp页面没有加 dictype html 标签 导致浏览器无法判断文档模式 所以直接杂项
楼主怎么解决的??我也遇到这样的问题
hebsxl2000 2012-08-24
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

一般是css兼容性没写好
[/Quote]
兼容性没写好? 是不是html页面在ie8不能正确编译css啊,导致文档模式直接杂项
重剑无锋1026 2012-08-24
  • 打赏
  • 举报
回复
在<head>标签里添加个<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />这个试试,应该没问题了
001007009 2012-08-24
  • 打赏
  • 举报
回复
写css 页面得加上DTD
hebsxl2000 2012-08-24
  • 打赏
  • 举报
回复
谢谢大家 问题解决了
这个是个比较老的项目了
后来改版之后页面用iframe布局了
最外层的jsp页面没有加 dictype html 标签
导致浏览器无法判断文档模式 所以直接杂项
孟子E章 2012-08-23
  • 打赏
  • 举报
回复
一般是css兼容性没写好

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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