Consider the following snippet:
I had the same issue and the point is that the element was not adapting its width to the container.
Instead of using width:100%
, be consistent (don't mix the floating model and the flex model) and use flex by adding this:
.child { align-self: stretch; }
Or:
.parent { align-items: stretch; }
This worked for me.