9th
2008,04
div-css布局:overflow溢出hidden
昨天切个板出现溢出的问题.导致溢出的原因目前还不明白.先认为是浏览器的BUG吧.在织梦乱弹发帖子.运行代码显示与我本地的显示也不一样.郁闷了.
- <!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" />
- <title>无标题文档</title>
- </head>
- <style type="text/css">
- body {
- margin:0;
- background:url(../Images/default-bg.jpg) repeat-x;
- }
- .clear {
- clear:both;
- }
- img {
- border:0;
- }
- #main {
- width:1003px;
- }
- /*body2*/
- #b2-left {
- background:#000;
- width:29px;
- height:322px;
- float:left;
- }
- #b2-center-left {
- background:#333;
- width:441px;
- height:322px;
- float:left;
- }
- #b2-center-right {
- background:#666;
- width:504px;
- height:322px;
- float:left;
- padding:0;
- margin:0;
- }
- #b2-center-right-1 {
- background:#999;
- height:135px;
- }
- #b2-center-right-2 {
- background:#ff000;
- height:128px;
- }
- #b2-center-right-3 {
- background:#000;
- height:43px;
- }
- #b2-center-right-4 {
- background:#f00;
- height:16px;
- }
- #b2-right {
- background:#ccc;
- width:29px;
- height:321px;
- float:left
- }
- </style>
- <body>
- <div id="main">
- <div id="body2">
- <div id="b2-left"></div>
- <div id="b2-center-left"></div>
- <div id="b2-center-right">
- <div id="b2-center-right-1"></div>
- <div id="b2-center-right-2"></div>
- <div id="b2-center-right-3">
- </div>
- <div id="b2-center-right-4"></div>
- </div>
- <div id="b2-right"></div>
- </div>
- </div>
- </body>
- </html>
Name: Cngothic 
































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