Home > Web Front-end > HTML Tutorial > Under IE6, the DIV_html/css_WEB-ITnose at the top of the page cannot be fixed.

Under IE6, the DIV_html/css_WEB-ITnose at the top of the page cannot be fixed.

WBOY
Release: 2016-06-24 12:19:43
Original
858 people have browsed it

<html><head><title>index.html</title><style type="text/css">.top{	width:100%;	background:#FFCCFF;	height:30px;	vertical-align:middle;	position:fixed;	top:0px;	_position:absolute; 	_top:expression_r(eval_r(document.documentElement.scrollTop + 0));	left:0px;}</style></head><body><div class="top" id="top">++++++++++++++++++++++++</div><div style="text-align:center;" id="tabDiv"></div></body><script type="text/javascript">function mspaint(){	var str = "<table width='80%' align='center' border='1'>";	str += "<tr><td>年份</td><td>省份</td><td>地区</td><td>姓名</td><td>对手</td></tr>";	for(var i=0;i<100;i++)	{		str += "<tr><td>2013</td><td>河南省</td><td>洛阳市</td><td>蒋介石</td><td>孙中山</td></tr>";	}	str += "</table>";	document.getElementById("tabDiv").innerHTML = str;}mspaint();</script></html>
Copy after login


I want to fix the DIV at the top of the page, that is, when dragging the drop-down box, lock the DIV at the top of the page.
The above code works in IE8, IE9, and google chroom. Yes, only IE6 does not work,

Please tell me how to solve the problem that it works under IE6,

Thank you.


Reply to discussion (solution)

fixed This attribute is not supported under ie6. There are two ways to solve this.
1. Use js to solve: http://www.cnblogs.com/yjzhu/archive/2012/11/06/2756974.html The third one.
2. Use css to solve: css solves the problem of position:fixed failure under ie6.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template