How to use CSS to set the TD border

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

Set the Border Style for table table TD, the TD in the Table object will implement the border style, but the middle part TD will result in the appearance of the bilateral box.

The detailed case tutorials are as follows:

1. Corresponding CSS code

<style>. table-b table td{border:1px Solid #F00}//CSS comment: Set the red border style only for table TD labels */</style>

2. Corresponding HTML source code fragment

<div class= "Table-b" > <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.php.cn</td> <td>PHP</td> </tr> <tr> <td>PHP</td> <td>www.php.cn</td> <td>PHP</td> </tr> </table>

This is the way to use CSS to set the frame of TD, you learned it?

Related reading:

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


Use div and CSS as drop-down menus


css layout

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.