开发者

How to align a div bottom of a dynamic div

I have a div called content which comes as an ajax content. so how to align a di开发者_如何转开发v called footer after the ajax content has loaded using jquery?


Use absolute positioning. Set the bottom: property instead of top:


Have you parent div be position: relative and the child div be position: absolute. From there, it's pretty simple.

.parent
{
    position: relative;
}

.child
{
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    height: 20px; /*or whatever you want the height to be*/
    display: block;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜