I have a <td> that has valign="bottom" and the text contained in the td has font-size:100px.
How do I get rid of the space between the text and the border in a <td>.
Please find sample code here
http://jsfiddle.net/jM8JC/1/
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While you can do this, you shouldn’t. The reason there’s extra space between the the lower edge of the word and the bottom border is that’s where the lower parts, the descender of the
y,g, etc, goes: http://jsfiddle.net/davidThomas/jM8JC/17/ (in this demo I’ve setline-heightto1(no unit), which places the bottom edge of theyagainst the lower border.Adjusting the
line-heightto0.65places the lower edge of the wordtestagainst the bottom border, but it’s a fairly arbitrary measurement, and dependent upon thefont-sizeused, and, probably, the particular browser.And if you add
overflow: hiddenyou can also hide the descending portion of theyif you wish: http://jsfiddle.net/davidThomas/jM8JC/25/