Situation
- I have a set of
<div>
elements inside a container<div>
. - The width of the inner
<div>
are set to relative sizes in percentage. - Sometimes the sum of the widths of the inner divs are over 100%.
How it is
What happens currently, is that the inner divs are squashed in a way to fit the container.
<div id="container" style="float:left; display:flex; width: 500px">
<div style="background-color: black; width: 90%">test</div>
<div style="background-color: red; width: 90%">test</div>
</div>
https://jsfiddle.net/pgvhfb9e/2/
As you can see, the red one is exactly the same size as the black one.
What I want
What I need is that the last div is simply cut off at the end of the container. Therefore, the red one should only be 10% while the black one is 90%.