CSS setting table table for 1PX borders

Source: Internet
Author: User

When you write a page layout often encounter a table of 1PX borders, for the listing of large amounts of data, table is very appropriate, the meaning of table itself is to list display data, web standardization does not mean not to use the table tag, but instead of table to layout, Table itself is also within the standard.

itself table set border:0, the border is actually 2px. If you want to implement a 1PX border, you can set the following:

Table {border:1px solid blue; border-width:1px 0 0 1px;}

TD {BORDER:1PX solid blue; border-width:0 1px 1px 0;}

<table border= "0" cellpadding= "0" cellspacing= "0" ></table>

Principle: Table sets the top and left borders, TD sets the right and bottom boxes. This makes it possible to flatten out tables or use UL and so on.


Effect:

CSS setting table table for 1PX borders

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.