I have a DIV with display: block
(.out
).
In this DIV there is a flexbox with display: inline-flex
(.row
) that has one column (.infos
) that has a static width of 350px, and another column (.dynamic
) which should have a dynamic width depending on the content.
Now I have the problem that the outer DIV (.row
) is growing on the full screen. That's not my use case. I want a dynamic outer DIV.
Please check out my fiddle: https://jsfiddle.net/2ymx9oog/
.out {
border: 1px solid red;
display: block;
position: fixed;
top: 0;
left: 0;
}
.row {
display: inline-flex;
flex-direction: row;
padding: 10px;
border: 1px solid yellow;
}
.infos {
border: 1px solid green;
flex-basis: 350px;
}
.dynamic {
border: 1px solid blue;
flex: 1 1;
}
<div class="out">
<div class="row">
<div class="infos">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata
sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit a
</div>
<div class="dynamic">
Lorem ipsum
</div>
</div>
</div>
EDIT:
Now I recognized my problem: In reality I have a third div after the other div's. This third div should end with the second div, but it's content is to large. Is there any way to do that?
Checkout my updated fiddle: https://jsfiddle.net/2ymx9oog/9/