why is my content showing outside the div?
Do you really need float: right;
for .count
? I think text-align
should be enough for the desired layout.
Since you're already using position:relative
on the parent div. Try this instead:
.count {
position:absolute;
right:0;
bottom:10px;
}
You are floating .count
so it doesn't influence it's parent container's height.
Set overflow: hidden
on the parent (.commentbox
) or use one of the other float containing techniques so that it does.