所以我使用960網格系統,並發現了一些他們不支持的東西。我曾考慮切換到Blueprint,但我必須稍後再回到設計。無論如何,我已簡化我的代碼,以顯示我正在經歷:背景和CSS浮動
<!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>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Test CSS</title>
<style type="text/css">
.frame { width: 960px; margin-left: auto; margin-right: auto; }
.column { display: inline; float: left; position: relative; margin: 10px 10px 10px 10px; width: 300px; background-color: silver; }
#bkg { background-color: blue; }
</style>
</head>
<body>
<div class="frame" id="bkg">
<div class="column">Column A</div>
<div class="column">Column B<div><br/><br/><br/><br/></div></div>
<div class="column">Column C</div>
</div>
</body>
</html>
我想看到背景擴大到涵蓋所有3列。有什麼我可以做的擴大背景,所以它涵蓋了所有3列?
感謝您的信息。 – 2009-09-30 03:34:59