div-css布局:overflow溢出hidden
昨天切个板出现溢出的问题.导致溢出的原因目前还不明白.先认为是浏览器的BUG吧.在织梦乱弹发帖子.运行代码显示与我本地的显示也不一样.郁闷了.


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  5. <title>无标题文档</title>
  6. </head>
  7. <style type="text/css">
  8. body  {
  9.  margin:0;
  10.  background:url(../Images/default-bg.jpg) repeat-x;
  11.  }
  12.  
  13. .clear {
  14.  clear:both;
  15.  }
  16.  
  17. img {
  18.  border:0;
  19.  }
  20. #main  {
  21.  width:1003px;
  22.  }
  23.  
  24.  
  25. /*body2*/
  26.  
  27. #b2-left {
  28.  background:#000;
  29.  width:29px;
  30.  height:322px;
  31.  float:left;
  32.  }
  33. #b2-center-left {
  34.  background:#333;
  35.  width:441px;
  36.  height:322px;
  37.  float:left;
  38.  }
  39. #b2-center-right {
  40.  background:#666;
  41.  width:504px;
  42.  height:322px;
  43.  float:left;
  44.  padding:0;
  45.  margin:0;
  46.  }
  47. #b2-center-right-1 {
  48.  background:#999;
  49.  height:135px;
  50.  }
  51. #b2-center-right-2 {
  52.  background:#ff000;
  53.  height:128px;
  54.  }
  55. #b2-center-right-3 {
  56.  background:#000;
  57.  height:43px;
  58.  }
  59. #b2-center-right-4 {
  60.  background:#f00;
  61.  height:16px;
  62.  }
  63. #b2-right {
  64.  background:#ccc;
  65.  width:29px;
  66.  height:321px;
  67.  float:left
  68.  }
  69. </style>
  70. <body>
  71. <div id="main">
  72.   <div id="body2">
  73.     <div id="b2-left"></div>
  74.     <div id="b2-center-left"></div>
  75.     <div id="b2-center-right">
  76.       <div id="b2-center-right-1"></div>
  77.       <div id="b2-center-right-2"></div>
  78.       <div id="b2-center-right-3">
  79.       </div>
  80.       <div id="b2-center-right-4"></div>
  81.     </div>
  82.     <div id="b2-right"></div>
  83.   </div>
  84. </div>
  85. </body>
  86. </html>

, ,

Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

Related Post

1 Comment so far...

  1. Cngothic

    感谢织梦·woou的帮助。
    上述溢出的原因出来没有对其字符设置大上
    * {font-size:12px;}
    即可解决此问题。
    或用日志中所说的hidden

Leave a reply?