我正在eclipse中使用Web Tools Platform,它提供了WYIWYG功能。现在我遇到了这个问题,两个容器不在同一行显示。真奇怪的是,当我将文件导出到桌面并使用浏览器打开它时,两个容器显示为一行,但没有边距。为什么有两种不同的外观?我的意思是,eclipse插件可能无法正常工作,但最迟在浏览器中打开文件时,它应显示我编码或不编码的内容?eclipse网页编辑器:div不在线
这里是什么,我想说明两个画面:
下面是HTML文件:
<!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=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="mainStyle2.css" />
<title>title</title>
</head>
<body>
<div id="container">
<div id="header"><b>main title</b></div>
<div id="navigation" style="float:left">
<b>Navigation</b> <br /><hr />
Welcome<br />
Team<br />
Links<br />
Screenshots<br />
</div>
<div id="contCont" style="float:left">
Content
</div>
</div>
</body>
</html>
...和CSS- file:
@CHARSET "ISO-8859-1";
#container{ background-color:#00FF59;
width:1200px;}
#header{ background-color:#99FF99;
text-align:center;
font-family:bookman old style;
font-size:50px;
margin-top:20; margin-bottom:10;
margin-left:20; margin-right:20;}
#navigation{ background-color:#99FF99;
width:200px; height: 800px;
font-family:bookman old style;
font-size:20;
margin-top:10; margin-bottom:10;
margin-left:20; margin-right:20;}
#contCont{ background-color:#99FF99;
width:1000px; height: 800px;
font-family:bookman old style;}
注意:我已在“导航”和“contCont”中用float:left
对其进行了测试,但没有更改。