很多人在以往的頁面制作中用valign:bottom實現底部對齊。
但是在xHTML中,CSS中沒有了這個就不知道如何是好,以下為解決方法:
css:
#box1
{
position
:
relative
;
background
:
red
;
height
:
100px
;
width
:
100px
;
}
#box2
{
position
:
absolute
;
background
:
#BBB
;
height
:
20%
;
width
:
100%
;
left
:
0
;
bottom
:
0
;
}
html:
<div?id="box1">
<div?id="box2">在下邊了</div>
</div>
posted on 2006-04-02 03:29
Raven 閱讀(2666)
評論(2) 編輯 收藏 所屬分類:
XHTML/CSS