About TD's height and Line-height compatibility issues _ Experience Exchange

Source: Internet
Author: User

The conclusion obtained by the PS intercept screen
When setting td{height:22px, the page displays: IE is 22px, FF is 21px; The practice proves that IE will always have a big 2px,ff 1px less.
When setting td{line-height:22px}, the page shows: IE is 24px; FF is 24px; it's a lot more 2px than it is, but it stays the same.

You can also measure it yourself.

<!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "lang=" gb2312 "> <pead> <title ></title> <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <meta http-equiv=" content-language "content=" gb2312 "/> </pead> <body> <tab Le class= "table01" cellspacing= "0" > <tr> <td width= "70%" > Dell Vostro 1400</td> & LT;TD width= "15%" >¥5899</td> <td width= "15%" >↓1355</td> </tr> <tr> &LT;TD width= "70%" > Dell Vostro 1400</td> <td width= "15%" >¥5899</td> <td Widt H= "15%" >↓1355</td> </tr> <tr> <td width= "70%" > Dell Vostro 1400</td> &LT;TD width= "15%" >¥5899</td> <td width= "15%" >↓1355</td></tr> <tr> <td width= "70%" > Dell Vostro 1400</td> <td width= "15%" >¥5899& lt;/td> <td width= "15%" >↓1355</td> </tr> <tr> <td width= "70%" Dell Vostro 1400</td> <td width= "15%" >¥5899</td> <td width= "15%" >↓1355</td> </tr> </table> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.