摘要: 问题: 当一个容器内包含使用了float属性的元素时, float元素高度高于容器其他元素时会超过容器界限, 容器不会扩展来包裹float元素, 这将对界面布局造成影响, 例如 1 2 3 4 float 5 22 23 24 25 26 27 28 我是一个浮动元素29 30 这里是普通流中的元素31 32 33 上面#wrapper不能包裹float的#sidebar, 占了我的地盘34 35 36 在firefox下显示为:解决办法:在容器最底部放置一个空, 等高度为0的元素, 为其设置clear样式... 阅读全文
posted @ 2013-11-10 23:22 我的百科全书 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 1.我猜作者肯定这样弄的 1 #wrapper { 2 width: 100%; 3 float: left; 4 } 5 #content { 6 margin-right: 50%; 7 } 8 #navigation { 9 float: left;10 width: 25%;11 margin-left: -25%;12 }13 #extra {14 float: left;15 width: 25%;16 margin-left: -50%;17 }18 #footer {19 clear: both;20 }果然..2.float向右 1 #... 阅读全文
posted @ 2013-11-10 23:08 我的百科全书 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1.作者方法1 div#wrapper{float:left;width:100%}2 div#content{margin-right: 50%}3 div#navigation{float:left;width:25%;margin-left:-50%}4 div#extra{float:left;width:25%;margin-left:-25%}5 div#footer{clear:left;width:100%}2.这个貌似很简单 1 #wrapper { 2 width: 50%; 3 float: left; 4 } 5 #navigation { 6 width:... 阅读全文
posted @ 2013-11-10 00:08 我的百科全书 阅读(118) 评论(0) 推荐(0) 编辑