Home>Article>Web Front-end> How to remove html table border
Method to remove html table border: first create an HTML sample file; then create the table content through the table tag in the body; finally pass css attributes such as "border-left: none;border-right: none;" Just remove the specified table border.
The operating environment of this article: Windows7 system, CSS3&&HTML5 version, Dell G3 computer.
Table in HTML removes the left and right borders
.table { text-align: center; } .table table { font-size: 14px; border-collapse: collapse; width: 70%; table-layout: fixed; text-align: center; line-height: 25px; margin:0 auto; } .table table tr { border: dashed 1px #a59e9e; border-left: none; border-right: none; }
The effect is as shown in the figure:
Attached is the original html code:
Table去掉左右两边的边框
人员信息
姓名 | 性别 | 年龄 | 出生日期 | 地址 |
小明 | 男 | 20 | 1998-10-12 | 北京市 |
小花 | 女 | 19 | 1999-02-02 | 上海市 |
小强 | 男 | 22 | 1996-05-04 | 上海市 |
[Recommended learning:css video tutorial]
The above is the detailed content of How to remove html table border. For more information, please follow other related articles on the PHP Chinese website!