My webpage has 2 labels displayed side by side, but due to the system text size being set at 150% (which is recommended) in Windows, the second label does not have enough space and gets pushed below the first label. I am looking for a way to determine if the second label is moving to a new line using JavaScript or CSS, so that I can adjust the content of the first label accordingly.
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="21434e4e55525553405161150f120f0bb">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<label class="form-label fw-bold">testing out label1</label>
<label (click)="method()" class="float-end fw-bolder">
<em class="fas fa-exclamation-circle"></em>
testing label 2 testing
</label>
Note: The issue occurs when the browser zoom level is set to 100% with the Windows text size at 150%.