CSS defines table

Source: Internet
Author: User

DIV is too much written, and sometimes the table is still troublesome, It is a border, it is a spacing or something, I think there are too many definitions, look at a table I encountered

CodeAs follows:

<Table cellspacing = "0" cellpadding = "8" width = "100%" bordercolor = "# c4e2ff" bordercolordark = "# ffffff" bgcolor = "# e8fbff" border = "1">
<Tr>
<TD align = "right" width = "17%"> QQ number: </TD>
<TD align = "Left" width = "83%"> 123456 </TD>
</Tr>
<Tr>
<TD align = "right"> MSN: </TD>
<TD align = "Left"> 123456@1222.com </TD>
</Tr>
</Table>

Let's see if there are a lot of definitions. It's not compatible yet. bordercolordark won't work in Firefox and opera. The table in IE has a thin line of color. When it comes to Firefox, opera will become black and ugly.

try to define it with CSS. I found a bunch of websites and got them done. The Code is as follows:











QQ number: 123456
MSN: 123456@1222.com

Note: border-collapse: collapse; is the key to ensuring the fine line under Firefox and opera, and TD must be added with border or else there will be no line in it.

OK, ie/Firefox/opera passed the test. It's good to free the table :)

From: http://www.cnblogs.com/xiaoman_890/archive/2009/05/11/1454207.html

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.