I currently have a div tag and within that tag contains an img tag and a p tag. I wish to center these two elements on the same horizontal axis.
This is my code:
.template-pill {
display: flex;
justify-content: center;
}
.pill-icons {
height: 20px;
width: 20px;
}
<div className="template-pill">
<img className="pill-icons" src={healthy_logo} />
<p> Healthy </p>
</div>
This is what I currently have:
But this is what I'm trying to accomplish: