我有一個簡單的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