Home >Web Front-end >HTML Tutorial >How to set the distance between table cells and table borders_html/css_WEB-ITnose

How to set the distance between table cells and table borders_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:18:183617browse

cellspacing sets a spacing on all sides of the cells in all tables, and now requires the margins between the cells on the sides and the table to be 0.


Reply to discussion (solution)

Add border='1' style='border-collapse:collapse;' cellspacing='0' bordercolor='black' to the Table tag

Add border='1' to the Table tag style='border-collapse:collapse;' cellspacing='0' bordercolor='black'

border-collapse:collapse; only merges double borders, and will invalidate cellspacing.

It can’t be achieved with a table. You can implement it by inserting a div in the td of the table

I just want to see if there is a simple and direct method. The DIV can be adjusted by yourself. Different positions require different styles.

Statement:
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