1

The li height is not defined and it automatically changes with the content. However, it only changes with the right hand side of its content rather than the left. Have changed the left side to block but it does not work. The link is as follows: [http://ec2-52-32-145-125.us-west-2.compute.amazonaws.com/#/posts][1]

Anson Yao
  • 1,544
  • 17
  • 27
  • 2
    This is pretty much exactly the same as this question: [Floated element gets outside of its parent?](http://stackoverflow.com/questions/4837809/floated-element-gets-outside-of-its-parent) The left image is floated and is not contained by the parent. – misterManSam May 16 '16 at 00:32
  • Another solution is to use a [clearfix as outlined here.](http://stackoverflow.com/questions/8554043/what-is-clearfix) – misterManSam May 16 '16 at 00:38
  • Thanks a lot. It works. I will close it. – Anson Yao May 16 '16 at 01:46

1 Answers1

1

Add this to your CSS:

.posts li {
    overflow: auto;
}
Johannes
  • 64,305
  • 18
  • 73
  • 130
  • Please vote to close as a duplicate of [this question](http://stackoverflow.com/questions/4837809/floated-element-gets-outside-of-its-parent) and delete this answer. This is a common problem and there is no need to keep this question around... – misterManSam May 16 '16 at 00:36