I usually have no problem with centering elements, but this time I can't do it. How i can center values on the right side? they are all different sizes and they must be centered and placed one directly below the other
.container {
&-mode {
display: flex;
justify-content: space-between;
margin-bottom: 5%;
}
&-status {
display: flex;
justify-content: space-between;
margin-bottom: 5%;
}
&-port {
display: flex;
justify-content: space-between;
margin-bottom: 5%;
}
&-button {
display: flex;
justify-content: space-between;
margin-top: 20%;
}
}
.activated {
background-color: #32cd32;
color: white;
padding: 1.5%;
}
.status_connection {
color: #32cd32;
}
.port_number {
text-decoration: underline;
text-align: center;
}
<div class="container">
<div class="container-mode">
<p>field 1</p>
<div class="activated">lorem lorem value 1</div>
</div>
<div class="container-status">
<p>field 2</p>
<div class="status_connection">lorem value 2</div>
</div>
<div class="container-port">
<p>field 3</p>
<div class="port_number">value 3</div>
</div>
</div>