Table of Contents
Reply to the discussion (solution)
Home Web Front-end HTML Tutorial I've been troubled for a long time, and I hope to solve the spacing problem of -tr_html/css_WEB-ITnose

I've been troubled for a long time, and I hope to solve the spacing problem of -tr_html/css_WEB-ITnose

Jun 24, 2016 pm 12:05 PM
tr answer long spacing

Spacing between tr
Whether you use css, html, or even js,
How to make the top and bottom of tr have a spacing?
(Don’t use the method of nesting tables in td)
Just want this effect


Reply to the discussion (solution)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>table{margin:0;padding:0;border-collapse:collapse;}td,th{border:solid 1px #ccc; width:100px;}.noborder{border:none;height:5px;overflow:hidden;}</style></head><body><table>	<tr>    	<th>姓名</th>        <th>学号</th>        <th>性别</th>        <th>年龄</th>    </tr>    <tr>    	<td>小马</td>        <td>00001</td>        <td>男</td>        <td>20</td>    </tr>    <tr>    	<td colspan="4" class="noborder"></td>    </tr>    <tr>    	<td>小李</td>        <td>00002</td>        <td>男</td>        <td>20</td>    </tr>     <tr>    	<td colspan="4" class="noborder"></td>    </tr>    <tr>    	<td>小张</td>        <td>00003</td>        <td>男</td>        <td>22</td>    </tr></table></body></html>
Copy after login
Copy after login

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>table{margin:0;padding:0;border-collapse:collapse;}td,th{border:solid 1px #ccc; width:100px;}.noborder{border:none;height:5px;overflow:hidden;}</style></head><body><table>	<tr>    	<th>姓名</th>        <th>学号</th>        <th>性别</th>        <th>年龄</th>    </tr>    <tr>    	<td>小马</td>        <td>00001</td>        <td>男</td>        <td>20</td>    </tr>    <tr>    	<td colspan="4" class="noborder"></td>    </tr>    <tr>    	<td>小李</td>        <td>00002</td>        <td>男</td>        <td>20</td>    </tr>     <tr>    	<td colspan="4" class="noborder"></td>    </tr>    <tr>    	<td>小张</td>        <td>00003</td>        <td>男</td>        <td>22</td>    </tr></table></body></html>
Copy after login
Copy after login


Is there no other way? Is there no way to set it up directly? Please reply, I’ll leave it alone if you don’t want to post it

Since you are using tables, there is generally a principle in CSS that you will not add styles to tags other than td and th. This will still cause compatibility issues. There are quite a lot, so the distance between rows is best filled with blank rows, that is, merging cells

Since you use tables, there is generally a principle in CSS , will not add styles to labels other than td, th, which brings a lot of compatibility issues. Therefore, it is best to fill the spacing between rows with blank rows, that is, merge cells


Thank you
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Five common Go language interview questions and answers Five common Go language interview questions and answers Jun 01, 2023 pm 08:10 PM

As a programming language that has become very popular in recent years, Go language has become a hot spot for interviews in many companies and enterprises. For beginners of the Go language, how to answer relevant questions during the interview process is a question worth exploring. Here are five common Go language interview questions and answers for beginners’ reference. Please introduce how the garbage collection mechanism of Go language works? The garbage collection mechanism of the Go language is based on the mark-sweep algorithm and the three-color marking algorithm. When the memory space in the Go program is not enough, the Go garbage collector

How to adjust word spacing How to adjust word spacing Mar 19, 2024 pm 07:10 PM

The content of word spacing includes word spacing and line spacing. The adjustment of spacing plays an important role in the document, affecting the overall layout and text presentation form. Reasonable word spacing can make the document content appear neat and not compact, and increase the reasonable visual effect. I hope that the editor’s explanation today can help you solve your problems and solve the problem of adjusting word spacing. The steps to adjust line spacing are as follows: 1. As shown in the figure, open the word document that needs to be adjusted, drag and select the content to be adjusted, right-click, and select paragraph options. 2. Find the spacing option in the pop-up dialog box, then click the line spacing drop-down list and select the line spacing size you need. After selecting, click OK, and the line spacing of the selected content will be adjusted. The steps to adjust word spacing are as follows:

CentOS File System FAQ CentOS File System FAQ Feb 23, 2024 pm 12:45 PM

CentOS file system FAQ The file system is a crucial component in using the CentOS operating system. It is responsible for storing, organizing and managing files and directories, and plays a vital role in the stable operation of the system and data security. However, inevitably, you will encounter some common problems when using file systems. This article will answer common questions about the CentOS file system, hoping to help readers better understand and deal with these problems. Question 1: How to check the usage of file system

Is OKB coin worth holding for the long term? Is OKB coin worth investing in? Is OKB coin worth holding for the long term? Is OKB coin worth investing in? Feb 27, 2024 pm 03:13 PM

Is OKB coin worth holding for the long term? OKB coin is a platform currency issued by OKEx exchange and was first launched on October 26, 2017. The total circulation is 1 billion, of which 70% is used to reward users, 20% is used for team and ecological construction, and the remaining 10% is used for marketing and operations. OKB coin has the following advantages: Transaction fee discount: OKB coin holders can enjoy transaction fee discounts on OKEx exchange, and the discount ratio is linked to the number of OKB coins held. Participate in platform governance: OKB coin holders can participate in the platform governance of OKEx Exchange, including voting for the management team of OKEx Exchange and participating in major decisions of OKEx Exchange. Participate in platform activities: OKB coin holders can participate in OKE

Is Tezos worth holding for the long term? Is Tezos coin worth investing in? Is Tezos worth holding for the long term? Is Tezos coin worth investing in? Feb 27, 2024 pm 03:30 PM

Is Tezos worth holding for the long term? Is Tezos coin worth investing in? Text Tezos is a cryptocurrency based on blockchain technology, founded in 2014 by Arthur Breitman and Kathleen Breitman. Tezos aims to provide a secure, efficient and scalable cryptocurrency solution and achieves this goal through its unique governance model. The project strives to provide a more democratic and transparent blockchain network by adopting self-healing capabilities and decentralized governance mechanisms. The innovation of Tezos lies in its ability to continuously upgrade and improve through community consensus to adapt to changing market needs and technological developments. This makes Tezos a high-profile addition

Is tr in php a column or a row? Is tr in php a column or a row? Aug 03, 2023 pm 02:53 PM

tr in php is row. In web development, table is a common HTML element used to display data. Tables are composed of rows and columns. The rows are used to display each record of the data, and the columns are used to display the value of each field. By nesting td tags, the content of each cell can be defined within the tr tag.

ThinkPHP6 FAQ ThinkPHP6 FAQ Jun 20, 2023 am 09:14 AM

With the development of the Internet era, web development frameworks are developing rapidly. ThinkPHP is an efficient web development framework based on the PHP language. It has excellent scalability and efficiency. It is one of the most widely used PHP development frameworks in China. The current version is ThinkPHP6, which is the latest version of ThinkPHP. It comes with many features such as routing, automatic loading, multiple applications, controller middleware, event mechanism, etc., and has a large number of users and contributors. This article will focus on the common problems of ThinkPHP6

Is Litecoin worth holding for the long term? Is Litecoin worth investing in? Is Litecoin worth holding for the long term? Is Litecoin worth investing in? Feb 27, 2024 am 09:10 AM

Litecoin: Is it worth holding on to for the long term? Litecoin (LTC) is a cryptocurrency founded in 2011 by former Google engineer Charlie Lee. Litecoin is similar to Bitcoin in many ways, but it has faster transaction confirmations and lower transaction costs. The long-term holding value of Litecoin depends on a variety of factors, including: Litecoin’s technical advantages: Litecoin has faster transaction speeds and lower transaction fees, which makes it a more practical method of payment. Litecoin’s market recognition: Litecoin is one of the top cryptocurrencies by market capitalization and has a large number of investors and users around the world. Litecoin’s development prospects: Litecoin’s core technical team is actively developing Litecoin’s technology, including improving transactions

See all articles