I have two children inside my flex container. The first one is a radio button group and the second one is a text. I would like the text to not exceed the width of the radio button group at any screen size. I do not know how to do it. Can you help me with this? I am sharing the code in stackblitz.
https://stackblitz.com/edit/angular-material-radio-button-demo-faar2f
Following is the html code:
<div class="container">
<mat-radio-group>
<mat-radio-button value=1> 1 </mat-radio-button>
<mat-radio-button value=2> 2 </mat-radio-button>
<mat-radio-button value=3> 3 </mat-radio-button>
<mat-radio-button value=4> 4 </mat-radio-button>
<mat-radio-button value=5> 5 </mat-radio-button>
<mat-radio-button value=6> 6 </mat-radio-button>
<mat-radio-button value=7> 7 </mat-radio-button>
<mat-radio-button value=8> 8 </mat-radio-button>
</mat-radio-group>
<div> This is the text content that I would like to always have
a width lesser than the radio betton button group.
</div>
</div>
Following is the css code:
.container {
display: flex;
flex-direction: column;
}