I have a title that can have one or more lines.
How can I align the text vertically? If it was always one line I could just set the line-height to the container heig
Instead of using vertical-align: center and display: table-cell, you might want to take a look at the newer method called CSS display flex which is MUCH simpler
.box {
width: 200px;
height: 50px;
padding: 10px;
margin-bottom: 20px;
background-color: red;
/* Only add these 2 lines */
display: flex;
align-items: center;
}
Lorem ipsum dolor
Lorem ipsum dolor sit amet ipsum dolor