Is there any possibilities to position a div to the right of the container without use of absolute position and float? Whenever I use the float:right
or position: absolute
the container does not know about the floated or positioned element content height which leads to layout issues.
I tried setting fixed height to the floated or positioned element then adding padding-bottom to the height of the floated or positioned element.
.container{
padding-bottom: 20px;
}
.container .float_right{
float: right;
height: 20px;
}
Even though it is okay but I am looking for better solution than this. Can anyone here tell me if there are any other solution to the problem?