Border merging of the CSS Attribute table's border-collapse and cssborder-collapse

Source: Internet
Author: User

Border merging of the CSS Attribute table's border-collapse and cssborder-collapse

Description

This CSS attribute is used to set whether the border of rows and columns of a table is merged into a single border, or whether they have their own border.

Default Value of separate. Borders are separated and not merged.
Collapse border merge. That is, if they are adjacent, they share the same border.

Although the table weight is getting lower and lower in the DIV + CSS era, sometimes the table is quite useful in some places.

Especially in tabulation, table is more convenient.
Of course, tabulation must have a border, but if you add a border directly to td, there will be a situation where the outer side of the table is a single line in a week, and there are two lines in it.

 

You can also use other separate settings to implement all single lines, but here is the simplest method. The border-collapse attribute in CSS can control the merging or splitting of connected borders.

 

CSS code

<style><!--table{ width:300px;     border-collapse:collapse;     overflow:hidden;} tr{ white-space:0;} td{ height:30px; border:#333333 solid 1px;}--><style>

Html:

<table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td>index</td><td>index</td><td>index</td></tr><tr><td>index</td><td>index</td><td>index</td></tr><tr><td>index</td><td>index</td><td>index</td></tr></tbody></table>

Refer:

Http://www.manongjc.com/article/1211.html

Http://www.manongjc.com/article/1212.html

Related Article

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.