I want to position a comments container relative to the post container . But the Post text can be of different size so i made it auto height . same for the comment container as it can contain any number of comments . but if i position the comment container as
#wallwrap .comment_container_out
{
position:absolute;
width:150px;
bottom:-15px;
left:80px;
}
it concides the bottom of the comment container to the bottom of the post container so when the number of comments increase , the height of the comment container also increases but it expands to upward direction while i want it to expand in the downward direction.
The post container is
#wallwrap .text_post
{
position:relative;
left:20px;
font-size:10px;
font-family:Helvetica,Arial, sans-serif;
color:#000;
background-color:#fff;
padding:5px 10px;
width:220px;
}
The crux of your problem is that you’re using position:absolute, which will remove the element from the normal HTML “flow”. When you then set it to “bottom: 0”, it will always fix itself to the bottom of the container, but grow vertically upwards.
Why are you trying to position it absolutely? Position:absolute should always be a last resort. If you’re just trying to separate the post area from the comments, I would simply add a margin-bottom to the post area.