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