I want to enhance my bar designing skills. I managed to create one, but I'm facing some issues.
How can I make this span align to the right? I tried using float but it didn't work. Any suggestions? Also, when I try to shrink the screen, the text becomes too small.
* {box-sizing: border-box}
.flex {
display: flex;
margin-bottom: 10pt;
}
.bar {
width: 100%;
background-color: #ccc;
line-height: 18pt;
}
.fill {
background-color: #7ef57e;
}
.tag {
text-transform: uppercase;
font-weight: 700;
text-align: center;
width: 25%;
background-color: #00A1A7;
font-size: 2vw;
float: left;
padding-left: 1%;
}
span.value {
float: right;
font-size: 2vw;
z-index: 1;
}
<body>
<div class="bar flex">
<div class="bar fill" style="width: 75%">
<div class="tag">Javascript</div>
</div>
<span class="value">75%</span>
</div>
</body>