DIV+CSS:IE6的3像素bug解決心得

來源:互聯網
上載者:User

例子:(一行三列)

<!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 http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style>
body { margin:0;}
#content { width:470px; margin:100px auto;}
#side { background: #99FF99; height: 300px; width: 120px; float: left; _margin-right:-3px;}
#side1 { background: #99FF99; height: 300px; width: 120px; float: right;_margin-left:-3px; }
#main { background: #99FFFF; height: 300px; margin:0 120px; _margin-right:-3px; _margin-left:-3px;}
</style>
</head></p>
<p><body>
<div id="content">
  <div id="side">此處顯示 id "side" 的內容</div>
  <div id="side1">此處顯示 id "side1" 的內容</div>
  <div id="main">此處顯示 id "main" 的內容</div>
</div>
</body>
</html>

 

特別提醒:通過測試,上面只有這樣寫才能顯示的。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.