用於布局架構:
#outer{
overflow:hidden;
}
#outer .panel{
float:right;
width:286px;
padding-left:21px;
border-left:1px solid #E5E3D7;
padding-bottom: 27670px !important;
margin-bottom: -27670px !important;
}
#outer .main{
float:left;
width:510px;
padding-bottom: 27670px !important;
margin-bottom: -27670px !important;
}
用於表格的JS代碼:
<script>
function div(){
var l=document.getElementById("div1").getElementsByTagName("li");
var num=4;
var i=l.length / num ;
for(var a=0;a<i;a++)
{
var max=l[num*a].scrollHeight;
var kk=num*a;
var dd=num*a;
for(kk;kk<l.length;kk++)
{
if(max<l[kk].scrollHeight)
{
max=l[kk].scrollHeight;
}
if(kk==num*(a+1)-1)
break;
}
for(dd;dd<l.length;dd++)
{
l[dd].style.height=max+"px";
if(dd==num*(a+1)-1)
break;
}
}
}
</script>
ps:在div裡面調用div()就把裡面的li重復4列的循環!