在ie6中<!DOCTYPE 引起滚动条,如何解决?

loyal 发布于 2013/04/11 10:45
阅读 339
收藏 0

一个框架页面,右侧显示一个页面如果不加DOCTYPE,IE6正常,加了,IE6就出现滚动条,貌似那个页面变大了~

框架页面:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>a</title>
</head>
<frameset rows="64,*" frameborder="NO" border="0" framespacing="0">
	<frame src="admin_top.do" noresize="noresize" frameborder="NO"
		name="topFrame" scrolling="no" marginwidth="0" marginheight="0"
		target="main" />
	<frameset cols="180,*" id="frame">
		<frame src="admin_left.do" name="leftFrame" noresize="noresize"
			marginwidth="0" marginheight="0" frameborder="0" scrolling="no"
			target="main" />
		<frame src="b.html" name="main" marginwidth="0" marginheight="0"
			frameborder="0" scrolling="auto" target="_self" />
	</frameset>
	<noframes>
	<body></body>
	</noframes>
</html>
被框架页面 :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>bb</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="login.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="1" cellpadding="0" cellspacing="0" style="height: 100%">
	<tr>
		<td width="17" valign="top" background="../images/mail_leftbg.gif"><img
			src="../images/left-top-right.gif" width="17" height="29px" /></td>
		<td valign="top" background="../images/content-bg.gif">
		<table width="100%" height="29px" border="0" cellpadding="0"
			cellspacing="0" class="left_topbg" id="table2">
			<tr>
				<td height="29px">
				<div class="titlebt">ttttt</div>
				</td>
			</tr>
		</table>
		</td>
		<td width="16px" valign="top" background="../images/mail_rightbg.gif"><img
			src="../images/nav-right-bg.gif" width="16" height="29" /></td>
	</tr>
	<tr style="background-color: blue;">
		<td style="height: 100%;">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
	</tr>
	<tr>
		<td valign="bottom" background="../images/mail_leftbg.gif"><img
			src="../images/buttom_left2.gif" width="17" height="17px" /></td>
		<td background="../images/buttom_bgs.gif"><img
			src="../images/buttom_bgs.gif" width="17" height="17"></td>
		<td valign="bottom" background="../images/mail_rightbg.gif"><img
			src="../images/buttom_right2.gif" width="16" height="17" /></td>
	</tr>
</table>
</body>
</html>
引入的css文件中主要是:

.fullhw{
height: 100%;
width: 100%;
}
html,body {
margin: 0px;
padding: 0px;
background-color: #EEF2FB;
width: 100%;
height: 100%;
}
td{text-align: left;}

其他CSS没有影响布局的地方.

加载中
返回顶部
顶部