How to eliminate spaces between tables in css

WBOY
Release: 2021-12-09 09:54:45
Original
3151 people have browsed it

In css, you can use the "border-collapse" attribute to eliminate the spaces between tables. This attribute can set whether the borders between tables are merged. When the value of the attribute is collapse, the spaces between tables can be eliminated and merged. Border, syntax "table element {border-collapse:collapse;}".

How to eliminate spaces between tables in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to eliminate the spaces between tables in css

In css, if you want to eliminate the spaces between tables, you can use the border-collapse attribute, border The -collapse attribute is used to set whether the table borders are merged into a single border, or displayed separately as in standard HTML.

If the value of the attribute is set to collapse, the borders between the tables will be merged into a single border, and the two tables share a border, thus eliminating the spaces between the tables.

How to eliminate spaces between tables in css

The example is as follows:

      Document  
111 222
333 444
555 666
777 888
111 222
333 444
555 666
777 888
Copy after login

Output result:

How to eliminate spaces between tables in css

(Learning video sharing:css video tutorial)

The above is the detailed content of How to eliminate spaces between tables in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!