div布局的问题
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style>
#div1 {
background-color:#eee;
height:25px;
}
#div2 {
background-color:#ccc;
height:25px;
}
#div3 {
background-color:#aaa;
height:25px;
}
#div4 {
background-color:#888;
height:25px;
}
</style>
</head>
<body>
<div id="div1"></div>
<form name="f1" action="go.asp" method="post">
<div id="div2"></div>
<div id="div3"></div>
</form>
<div id="div4"></div>
</body>
</html>
以上代码在IE7下面运行的话,DIV1和DIV2之间会多出个空白行(3和4之间也会),在FF下则没有
是HTML不规范还是什么引起的?
如果在IE的界面下去掉空白行?