开发者

How to align a div bottom of a dynamic div

开发者 https://www.devze.com 2023-04-07 19:08 出处:网络
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

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

精彩评论

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

关注公众号