Home > Web Front-end > CSS Tutorial > Example code for creating a thin line table using the border-collapse:collapse attribute in CSS

Example code for creating a thin line table using the border-collapse:collapse attribute in CSS

黄舟
Release: 2017-06-30 09:33:40
Original
2018 people have browsed it

The default table has a relatively wide border. You can use border-collapse:collapse; to implement a single-line table. See the example code

<style type="text/css">
.table{border:1px #000 solid;border-collapse:collapse;}
.table tr td{border:1px #000 dotted;}
</style>
<table class="table" width="750" cellspacing="0">
<tr>
<td width="80">1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr >
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
</table>
Copy after login

The above is the detailed content of Example code for creating a thin line table using the border-collapse:collapse attribute in CSS. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template