A lot of friends are very distressed table style how to set, today will give you a detailed explanation of CSS table style how to set. Let's start with a way to set a border on table only. And then give you a way to set other elements of the table, keep your eye on
Setting the border (border) style only on the table label will give the table a border at the outermost table and no border style inside the table.
The case details are as follows:
1. Corresponding CSS code
<style>. Table-a table{border:1px Solid #F00}//CSS comment: Set the red border style only for table labels */</style>
2. Corresponding HTML code fragment
1. Corresponding CSS code
<style>. Table-a table{border:1px Solid #F00}//CSS comment: Set the red border style only for table labels */</style>
2. Corresponding HTML code fragment
<div class= "Table-a" > <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>css learning </td> </tr> <tr > <td>CSS5</td> <td>www.php.cn</td> <td>css </td> </tr> </table > </div>
This is the way CSS only sets the border on the table's label, have you learned it?
Related reading:
Use div and CSS as drop-down menus
CSS3 Implementing a Shadow effect instance
Some points to be aware of in CSS layout