So there are a few moving parts with this one. I'll do my best to capture whats going on in a way that doesn't require me to dump the whole website here.
So here's the set-up: I've been using CSS to design a clickable link button with all the features of a hyperlink, namely the ability to have right click options. I've achieved this through a combination of a blocks, inline-blocks, and td's. Here is a code snippet that kind of captures what I'm doing:
a.classa:before {
content: "";
display: inline-block;
vertical-align: middle;
height: 100%;
font-size: 0px;
}
a.classa {
display: inline-block;
height: 100%;
width: 100%;
}
<table>
<tr>
<td>
<a class="classa" href="whatever">
long text that will break outside of the bottom of the inline-block when wrapped
</a>
</td>
</tr>
</table>
Theres obviously some simplification in that code, but it captures the root of the problem. Currently this code is doing 99% of what I intended it to do: the inline-block fills the whole td its nested in making the entire block clickable like a hyperlink, its formattable like any td or div, and the text floats properly in the center (that took a while to figure out), but if the text breaks outside of the inline-block and requires wrapping, the wrapped text will appear below and outside of the bounds of the parent td. I've tried a bunch of different things to get this to work: setting whitespace to pre, setting the content in the ::before class to \A, I can't even remember everything I've tried. I'm aware I can just set text wrapping to ellipses or something else, but that'd look pretty tacky and I'd really like for the text to wrap and center properly.
Any ideas?
JSFiddle example: https://jsfiddle.net/kr8e9pr2/