当前位置: 首页 > 图文教程 > 网页制作 > HTML/XHTML教程 > ie6 失真问题

HTML/XHTML教程
ie7打开页面有源文件但页面空白问题的解决方法
firefox支持webdings字体的方法
HTML 相对路径和绝对路径区别分析
ie6 失真问题
关闭IE启用图片工具列
HTML5 Canvas 起步(1) - 基本概念
网页表单元素Input的高级用法11例
漂亮样式表在XHTML+CSS网页制作中的应用
html ReadOnly 和 Enabled 区别
如何正确地在XHTML文档中使用JavaScript和CSS
IE6 为什么最多人使用
给网站添加 favicon的技巧 网址前面的小图标
什么是 WML?
WML 标签汇总
HTML相对路径 上级目录及下级目录的写法
html 自定义标签使用实现方法
Firefox下英文字母不换行的解决方案
HTML 文本转义小窍门
设置IE8使用IE7的样式的代码
HTML 标记一定不要忘记关闭

HTML/XHTML教程 中的 ie6 失真问题


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-11   浏览: 32 ::
收藏到网摘: n/a

问题:

<form...>下面的<input type="hidden" name="sortBy" id="sortBy" value="${sortBy}">占据物理位置的情况,代码如下:

<form name="header_product_search_form" method="post" id="header_product_search_form" action="${ctxPath }/products/productsSearch.html?doAction=productSearchAction">
<input type="hidden" name="headSearchCategoryPath" id="headSearchCategoryPath" value="${categoryPath }">
<input type="hidden" name="headSearchAttributePath" id="headSearchAttributePath" value="${headSearchAttributePath }">
<input type="hidden" name="attributePathInputValue" id="attributePathInputValue" value="${attributePathInputValue}">
<input type="hidden" name="PrmItemsPerPage" id="PrmItemsPerPage" value="${pagingBean.itemsPerPage}">
<input type="hidden" name="PrmPageNo" id="PrmPageNo" value="${pagingBean.currentPage}">
<input type="hidden" name="PrmTotalItems" id="PrmTotalItems" value="${pagingBean.numberOfItems}">
<input type="hidden" name="PrmTotalPages" id="PrmTotalPages" value="${pagingBean.numberOfPages}">
<input type="hidden" name="sortBy" id="sortBy" value="${sortBy}">

..............

..............

</form>

如上,红色的隐藏输入框直接在form标签下面,结果出现在ie下显示失真的情况,隐藏输入框占据物理空间,在ie里留下空白的部分。而在Firefox下显示正常。

解决方法:

把隐藏输入框放在form标签的最后面,即在</form>之上,ie下显示即可恢复正常。代码如下:

<form name="header_product_search_form" method="post" id="header_product_search_form" action="${ctxPath }/products/productsSearch.html?doAction=productSearchAction">

..............

..............
<input type="hidden" name="headSearchCategoryPath" id="headSearchCategoryPath" value="${categoryPath }">
<input type="hidden" name="headSearchAttributePath" id="headSearchAttributePath" value="${headSearchAttributePath }">
<input type="hidden" name="attributePathInputValue" id="attributePathInputValue" value="${attributePathInputValue}">
<input type="hidden" name="PrmItemsPerPage" id="PrmItemsPerPage" value="${pagingBean.itemsPerPage}">
<input type="hidden" name="PrmPageNo" id="PrmPageNo" value="${pagingBean.currentPage}">
<input type="hidden" name="PrmTotalItems" id="PrmTotalItems" value="${pagingBean.numberOfItems}">
<input type="hidden" name="PrmTotalPages" id="PrmTotalPages" value="${pagingBean.numberOfPages}">
<input type="hidden" name="sortBy" id="sortBy" value="${sortBy}">

</form>