JSFiddle: https://jsfiddle.net/u7Lm5sjp/
I have some links like:
<div class="splash_button_row">
<span>
<a href="www.google.com" class="splash_button">label 4 label 4 label 4 </a>
<a href="www.google.com" class="splash_button">label 2</a>
<a href="www.google.com" class="splash_button">label 5 label 5label 5</a>
<a href="www.google.com" class="splash_button">label 5 label 5label 5label 5 label 5label 5</a>
</span>
</div>
and a while bunch of .css like:
.splash_button {
background: linear-gradient(to bottom, #3498DB, #2980B9) repeat scroll 0% 0% #3498DB;
border-radius: 30px;
text-shadow: 6px 4px 4px #666;
box-shadow: 2px 2px 3px #666;
font-family: Georgia;
color: #FFF;
padding: 10px 20px;
border: 2px solid #216E9E;
text-decoration: none;
display: inline-block;
margin: 10px;
white-space: normal !important;
word-wrap: break-word;
max-width: 130px !important;
text-align: center;
font-size: 20px;
height: 65px;
vertical-align: middle;
}
The key fiddly bits here being:
height: 65px;
vertical-align: middle;
These two properties seem to be fighting one another. if I set vertical-align: middle;
the text is all aligned, and the padding is evenly drawn around it(which is what I want). But when I then set height: 65px;
to also make all of the buttons the same size, the text seems to get pushed to the top of the button.
How can I have all of the buttons the same (set) size, but also have the text within them vertically aligned to the center of the 'button'?
Edit:
I've read this question but it doesn't answer my question. My buttons have multiple lines, so the tricks with line-height don't work, and my buttons need to be in-line elements, so the tricks with flex don't work. Also my buttons need to be spaced, but the table-solutions seem to hinder that - but i'm still playing around with this one.