How to set the table border in css
Today, the editor will share with you the relevant knowledge points about how to set the border of the table in css. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.
Css table border setting method: 1, through "table {border:1px solid skyblue;}" to set the outer border; 2, through "td {border:1px solid skyblue;}" to set the cell border.
This article operating environment: windows7 system, HTML5&&CSS3 version, DELL G3 computer
You can use border:1px solid skyblue
1px is the pixel of the border, solid represents the solid edge of the frame, and skyblue is the color of the border. If you set table directly, it is only the outer border, such as:
11111 111111 11111 111111
Css:
Table {border:1px solid skyblue;}
Effect picture:
If you set a cell border, you can make each cell have a border, such as:
Td {border:1px solid skyblue;}
Effect picture:
Set the style with a cell spacing of 0 to:
Table {border-collapse:collapse;} td {border:1px solid skyblue;}
Effect picture:
These are all the contents of the article "how to set table borders in css". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.