Text getting cut off, because of line-height confl

2019-07-17 20:40发布

问题:

I have a table with a form that contains a submit button formatted like text, inside a table.

All table rows in general are set to vertical-align: top

If I don't apply an line-height to the formatted text, its bottom part will get cut off, noticeable with letters like p, q etc. (bottom part in fiddle)

If I do apply it a line-height, it will be aligned below other regular text elements in other cells. (bottom part in fiddle)

Here is the fiddle.

CSS:

.text-alt {
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    color: #4D4D4D;
    background: 0 0;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    -moz-user-select: text;
    //line-height: normal;
}
tr:first-child td {
    vertical-align: top
}

tr:first-child+tr td {
    vertical-align: top;
    background-color: #fff
}

For Full CSS / HTML please refer to fiddle.