当使用了ExtJs后,脚本documentElement.clientWidth得到的值是0,需要换成Ext.getBody().getWidth()来获得。
关于解决IE的min-width方法就可以这样写:
//===========Style===============//
//===========Page================//
关于解决IE的min-width方法就可以这样写:
//===========Style===============//
#hxcy{ text-align:right;margin:0 auto; min-width:778px;width: expression((Ext.getBody().getWidth() < 778) ? "778px" : "auto" );}
/*---注意:这里将documentElement.clientWidth替换为了Ext.getBody().getWidth()----*/
//===========Page================//
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ include file="/ecside/common/head_showResult.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>title</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="${ctx}/scripts/ext/resources/css/ext-all.css">
<link rel="stylesheet" type="text/css" href="${ctx}/styles/demo_index.css">
<script type="text/javascript" src="${ctx}/scripts/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="${ctx}/scripts/ext/ext-all.js"></script>
<script type="text/javascript" src="${ctx}/scripts/demo_index.js"></script>
</head>
<body>
<div id="west">
<p>
Hi. I'm the west panel.
</p>
</div>
<div id="north" class="header">
<div id="hxcy">
<div class="logo"><img src="${ctx}/images/logo.gif" /></div>
<div class="header_menu">
<ul>
<li id="ico_home"><a href="${ ctx }/j_acegi_logout" target="_parent">设为主页</a></li>
<li id="ico_favoritor"><a href="${ ctx }/j_acegi_logout" target="_parent">添加到收藏夹</a></li>
<li id="ico_application"><a href="${ ctx }/j_acegi_logout" target="_parent">切换平台</a></li>
<li id="ico_quit"><a href="${ ctx }/j_acegi_logout" target="_parent">退出</a></li>
<li id="ico_help"><a href="${ ctx }/j_acegi_logout" target="_parent">帮助</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>