How to Set table borders on table and TD tricks

Source: Internet
Author: User
A lot of friends are worried about how the table style is set. Previously said set the border on table and set the border to TD. Today brings you to table and TD skills to set the table border, will continue to update the table on the small tips and settings, please continue to pay attention to.

Set the TD to the left and the top border, so TD and TD will only appear in a single border style, so that the table will appear on the right and bottom of no border, this time we set the table right and bottom of the box to resolve the display of the right side and the lower TD left no border display.

1. Corresponding CSS code:

<style>. table-c table{border-right:1px solid #F00; border-bottom:1px solid #F00}. table-c Table Td{border-left : 1px solid #F00; border-top:1px solid #F00}/* Only set left and top borders on table TD, set right and bottom boxes on table; */</style>

2. Corresponding HTML source code fragment:

<div class= "Table-c" > <table width= "" "border=" 0 "cellspacing=" 0 "cellpadding=" 0 "> <tr> <td Width= "" > Station name </td> <td width= "181" > URL </td> <td width= "A" > Description </td> </tr> <tr> <td>PHP</td> <td>www.divcss5.com</td> <td>PHP</td> </tr> < tr> <td>PHP</td> <td>www.php.cn</td> <td>PHP</td> </tr>

That's how you set table borders on table and TD tricks, you learn?

Related reading:

How to use CSS to set the TD border


How do I use CSS to set borders on a table's labels only


Use div and CSS as drop-down menus

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.