I am experiencing an issue with an image that I have built:
Initially, the image appears to be a box with 4 elements inside. However, when I resize the window, the layout gets distorted. I am unsure which property I am using incorrectly, so I will provide a .gif to demonstrate the issue:
https://i.sstatic.net/1z2wC.jpg
Here is the result when I resize the window: THIS IS THE MESS WHEN I RE-SIZE THE WINDOW Below is my code:
HTML:
<div class="containerRebalance">
<div class="firstTittleRow1">
<div class="iconwarning">
<mat-icon [ngStyle]="{'color':'#f06f0f'}">warning</mat-icon>
</div>
<div class= secondTittleRow>
<div class="textoWarning">
Para enviar tu solicitud de modificación, es necesario
que los porcentajes de participación por cada
beneficiario sea mayor a cero y que la suma de las
participaciones en cada prioridad sea igual al 100%
</div>
</div>
<div class="linetext">
<div class="texto1">
<p class="texto1">
¿Desea repartir en partes iguales el porcentaje
de participación de la {{prioridad}}?
</p>
</div>
<div class="texto2">
Yes
</div>
<div class="texto2">
No
</div>
</div>
</div>
</div>
SASS
.texto1
float: left
margin-top: -1px
margin-left: 12px
font-size: 14px
line-height: 21px
font-family: "Titillium Web", sans-serif
font-weight: 400
color: rgb(96, 110, 125)
.texto2
font-size: 14px
line-height: 21px
font-family: "Titillium Web", sans-serif
font-weight: 400
color: rgb(96, 110, 125)
float: right
padding-right: 55px
.iconwarning
float: left
padding-top: 24px
.firstTittleRow1
padding-left: 10px
height: 73px
display: block
.linetext
display: block
.textoWarning
font-size: 14px
line-height: 18px
font-family: "Titillium Web", sans-serif
font-weight: 400
color: rgb(96, 110, 125)
padding-top: 20px
.secondTittleRow
display: flex
padding-left: 10px
height: 73px
.containerRebalance
height: 113px
background: #fdf6e9
border: 1px solid #f9ce93
color: #4d5966
font-size: 0.75rem
font-family: Roboto-Medium
align-items: center
padding: 0 0.9375rem
line-height: 17px
margin-top: 48px
padding-bottom: 1px
How can I prevent the elements from becoming distorted while maintaining their order within the main square? I don't mind if the buttons move down, as long as the main layout stays intact. Thank you very much.