好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

诡异的div边距,要命的无解问题,诚心求答案_html/css_WEB-ITnose

如上图哦,蓝色部分是背景浮动div,中间白色的是居中div。没有设置任何外边距。
我的问题是:白色div部分的上方和下方为什么会出现外边距?
好难懂啊。


回复讨论(解决方案)

贴代码吧这样看是看不出来什么的。

清零了吗?

*{margin:0;paddding:0;} 

  	 		 		 show2 		 		 		 			body{			}			.alignCenter{				margin: 10px auto;				width: 950px;							}		 	 	 								 		._head{width: 100%; float: left}		a{display:inline-block;margin-left: 20px;text-align: center;font-family:"Arial" "黑体";color: white;}		.nv_logo{width: 950px;height: 128px;}		.logo{width: 246px;height: 128px;float: left}		.nv{width: 704px;height: 30px;padding-top: 98px;background-image: url(src/nv.png);background-repeat: no-repeat;float: left;background-position: -10px 80px;text-align: center;}		 		

查看更多关于诡异的div边距,要命的无解问题,诚心求答案_html/css_WEB-ITnose的详细内容...

  阅读:35次