随笔-9  评论-49  文章-0  trackbacks-0

很多人在以往的页面制作中用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 阅读(2633) 评论(2)  编辑  收藏 所属分类: XHTML/CSS

评论:
# re: 基于标准,实现底部对齐 2006-08-15 20:27 | wf
怎么做类 table中 3列 左边左对齐,右边右对齐,剩下中间的 居中对齐啊?  回复  更多评论
  
# re: 基于标准,实现底部对齐 2008-01-04 14:21 |
这也算解决办法啊!!  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: