Looking at the hierarchy of your elements, parent
holds child
, which is divided into one
, two
, and three
.
The width:25%
of each child makes 4 elements take up the 100% width, hence the last element (child three, green) comes below them.
But since they are still contained within the parent parent
div, it cannot float on top of another element that is already there, which is taking some place there (yellow with height: 120px
).
To make the green line up to the left, either make the height of all the elements equal, or put the green box (child three) outside the parent
div.
Or you can also use the clear: left
property for child three.