I'm trying to centralize an icon and a paragraph in the header of application. Currently it looks like this.
I want to show an icon and a paragraph with same height. I added padding-bottom
to make it happen though it didn't work.
sample.js (The application is made with React.js )
<div className="title"><img src={title} className="title" alt="title" />SAMPLE TITLE</div>
index.css
.title {
text-decoration: none;
background-color: #454545;
color: white;
padding-bottom: 10px;
}
Edit :
This question was marked as duplicate with Vertically align text next to an image?. I didn't know about vertical align
and I think there is people like me, so I would like to keep this question.