A simple css layout problem

I"d like to ask you a question about the two-column layout.

HTML:

<div class="container">
    <div class="left">12.23%</div>
    <div class="right"></div>
</div>

CSS:

.container {
        display: flex;
        width: 200px;
        border:1px solid black;
        height: 20px;
        line-height: 20px;
}
.left {
        width: 20%;
        margin-right:20px;
}
.right {
        flex: 1;
        background-color: pink;
}

is shown as follows:

my requirement is that the width of the container is not fixed, but the UI ensures that the percentage on the left is fully displayed and does not overlap with the pink area on the right. The width of the pink area is the width of the container minus the width of the percentage number. The code I wrote above will go wrong when the width of the container is small, and the numbers will be covered directly. Is there any good solution?

Css
Mar.01,2021

min-width: 2em;


as you said, if you write 20% on the left, you will make mistakes when the width is smaller. This is because your text does not become smaller when the width becomes smaller (originally quite compact, the proportion of the text has become larger). Can the left be written with a fixed, or minimum width, or a relatively generous width? this solves the fundamental problem


.container {
        display: flex;
        width: 200px;
        border:1px solid black;
        height: 20px;
        line-height: 20px;
}
.left {

}
.right {
        flex: 1;
        background-color: pink;
}
.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9fc64-47863.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9fc64-47863.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?