Solution to table line border duplication css_html/css_WEB-ITnose
1. The border of td overlaps the border of table
.table { border-left:1px solid #dedede; border-top:1px solid #dedede;}
.td { border-right:1px solid #dedede; border-bottom:1px solid #dedede;}
table only uses the left border and the top border, and each td only uses the right border and the bottom border, The effect is that the left and top borders of the entire table are continuous solid lines, and the right and bottom borders are borders that continue td, so they are intermittent
Solution:
.table {border:1px solid #dedede ; border-collapse:collapse;}
.td {border:1px solid #dedede; } The orange font is the key, and the border settings do not need to be divided into top, bottom, left and right. If they overlap, one will cover the other
In firefox: the border of td covers the table, and the border of table in IE covers the border of td. The border color here is the same, it doesn’t matter
Table line FAQ:
1. Table Overlap of border and table cell lines. [Use border-collapse:collapse to solve]
2. The problem of overlapping edges of nested tables and nested tables. [Use border-top|left|right|bottom to solve]
3. The problem of nested tables and nested tables being misaligned. [Use table-layout: fixed; to solve]
4.border-collapse has two attributes, separate and collapse.
separate is the default attribute. The table border has a gap of 1px by default. In the era of table layout, we set the table background color. We used it to squeeze out the outer border of the block;
collapse, It is to remove the gap between the table borders, so that no double lines will be generated when assigning values to the td border of the table.
Demo: Two-line table without collapse attribute set

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...
