我有一个简单的HTML页面,在IE 8和更高版本中工作正常,但在IE 7中,正确的部分被换行。我怎样才能在IE 7中防止这种情况?我试图清楚:两者都显示:内联解决方案,但都没有工作。IE 7浮动:右边是在浮动右上方创建一个空行div
我的HTML代码是:
<!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 id="Head1">
<meta http-equiv='X-UA-Compatible' content='IE=7,chrome=1' />
<title>Sample Page
</title>
<style type="text/css">
.error
{
color: Red;
font-family: Arial;
font-size: small;
}
.feedback
{
color: Red;
font-weight: bold;
font-size: large;
}
.inprocess
{
background-color: lightyellow;
}
.inerror
{
background-color: #FFE2E6;
}
.success
{
background-color: #EFFFD5;
}
</style>
</head>
<body>
<div id="headerDiv" style="width: 100%; min-width: 900px; margin-bottom: 15px;">
<span style="font-size: small; font-weight: bold; color: gray">Welcome back, </span>
<label class="strong" for="logout" style="color: Navy; font-size: small; font-weight: bold; font-family: Sans-Serif">
XYZ
</label>
,
<label class="strong" for="logout" style="color: Navy; font-size: small; font-weight: bold; font-family: Sans-Serif">
ABCD
</label>
<a href="javascript:closeWP();" id="logout"
title="Log Out" style="text-align: right">Log Out</a>
<span id="adminHintLabel" >
<div style='margin: 5px 0px 14px 0px; float: right; font-family: arial; font-size: small;'>
(For record with error, double click on the row to view error message.)
<div style='height: 14px; width: 14px; float: left; background-color: lightyellow; margin-right: 4px; border: 1px solid black;'></div>
<div style='float: left; padding-right: 14px;'>Being Processed</div>
<div style='height: 14px; width: 14px; float: left; background-color: #FFE2E6; margin-right: 4px; border: 1px solid black;'></div>
<div style='float: left; padding-right: 14px;'>Record has Error/s</div>
<div style='height: 14px; width: 14px; float: left; background-color: #EFFFD5; margin-right: 4px; border: 1px solid black;'></div>
<div style='float: left; padding-right: 14px;'>Promoted</div>
</div>
</span>
</div>
</body>
</html>
期待的显示需要是这样的:
谢谢。有用。你的解释非常好,很有帮助。 – Sunil