今天學習到了一個非常神奇的css布局方法
position: absolute;
top:61px;
bottom: 0px;
把 position設置為 absolute 後 top就是頂邊拉 left就是左邊拉
那麼如果把 底邊調成0.嘿嘿,是不是變成窗口自適應了?
做這個的時候想過 直接設置 height:100%.但是這是無效帝,,,具體為什麼我也不知道哈...
[css]
#head{
width:100%;
height:61px;
border-bottom:solid 1px #ccc;
background-image:url(../img/topbg.gif);
background-repeat:repeat-x;
}
#logo{
width:189px;
height:61px;
background-image:url(../img/logo_dmin.png);
}
#left{
padding-top:15px;
width:205px;
height:auto;
overflow-y:auto;
background-image: url(../img/leftbg.gif);
position: absolute;
top:61px;
bottom: 0px;
}
#left h4{
margin-left:18px;
background-image:url(../img/menuf.gif);
height: 20px;
width: 160px;
font-size: 12px;
text-align: center;
line-height:20px;
//font-weight:normal;
}
#left li{
padding-top: 5px;
padding-bottom: 5px;
padding-left:36px;
cursor: pointer;
color:#555;
font-size: 12px;
}
#right{
overflow-y:auto;
position: absolute;
top:61px;
left: 205px;
bottom:0px;
right:0px;
}
#head{
width:100%;
height:61px;
border-bottom:solid 1px #ccc;
background-image:url(../img/topbg.gif);
background-repeat:repeat-x;
}
#logo{
width:189px;
height:61px;
background-image:url(../img/logo_dmin.png);
}
#left{
padding-top:15px;
width:205px;
height:auto;
overflow-y:auto;
background-image: url(../img/leftbg.gif);
position: absolute;
top:61px;
bottom: 0px;
}
#left h4{
margin-left:18px;
background-image:url(../img/menuf.gif);
height: 20px;
width: 160px;
font-size: 12px;
text-align: center;
line-height:20px;
//font-weight:normal;
}
#left li{
padding-top: 5px;
padding-bottom: 5px;
padding-left:36px;
cursor: pointer;
color:#555;
font-size: 12px;
}
#right{
overflow-y:auto;
position: absolute;
top:61px;
left: 205px;
bottom:0px;
right:0px;
}html的代碼為
[html]
<div id="head">
<div id="logo"></div>
</div>
<div id="left">
<h4>文章管理</h4>
<ul>
<li>添加欄目</li>
<li>添加文章</li>
<li>管理文章</li>
</ul>
<h4>網站管理</h4>
<ul>
<li>基本設置</li>
<li>其他</li>
</ul>
</div>
<div id="right">加載中</div>
</body>
<div id="head">
<div id="logo"></div>
</div>
<div id="left">
<h4>文章管理</h4>
<ul>
<li>添加欄目</li>
<li>添加文章</li>
<li>管理文章</li>
</ul>
<h4>網站管理</h4>
<ul>
<li>基本設置</li>
<li>其他</li>
</ul>
</div>
<div id="right">加載中</div>
</body>
以前是用分幀,當然這樣很方便,也非常好用哈,
[html]
<frameset rows="61,*,24" cols="*" framespacing="0" frameborder="no" border="0">
<frame src="<{$url}>/top" name="top" scrolling="no" noresize="noresize" />
<frameset cols="200, *">
<frame src="<{$url}>/menu" name="menu" noresize="noresize" scrolling="no" />
<frame src="<{$url}>/main" name="main" noresize="noresize" scrolling="yes"/>
</frameset>
<frame src="<{$url}>/bottom" name="bottom" scrolling="No" noresize="noresize" />
</frameset
<frameset rows="61,*,24" cols="*" framespacing="0" frameborder="no" border="0">
<frame src="<{$url}>/top" name="top" scrolling="no" noresize="noresize" />
<frameset cols="200, *">
<frame src="<{$url}>/menu" name="menu" noresize="noresize" scrolling="no" />
<frame src="<{$url}>/main" name="main" noresize="noresize" scrolling="yes"/>
</frameset>
<frame src="<{$url}>/bottom" name="bottom" scrolling="No" noresize="noresize" />
</frameset
上面都在談的都不是php的哈
確實今天寫的php跟以前的都差不多,今天學到的一個新函數是
mysql_affected_rows 用於讀取命令執行後影響的行數.