I've created an HTML file structured like this.
<html>
<head>
</head>
<body>
<div class="final_time">
<p class="final_time_text">some text here</p>
</div>
</body>
</html>
Below is the corresponding CSS file for the HTML setup.
.final_time {
width: 20px;
height: 20px;
background-color: green;
border-radius: 50%;
position: absolute;
right: 15%;
top: 50%;
margin-left: -50px;
margin-top: -50px;
}
.final_time_text {
width: 200px;
left: -20px;
}
Is it possible to adjust .final_time_text
slightly to the left so that it aligns perfectly with the center of .final_time
?
An example of the desired alignment can be seen in this image: https://i.sstatic.net/aZyJ6.png
Initially, I tried using left: -20px
to shift it to the left, but it didn't work as expected.
To see the code in action, check out the JSFiddle link provided here: https://jsfiddle.net/rf2vnozq/4/