Home  >  Article  >  Web Front-end  >  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

黄舟
黄舟Original
2017-06-30 09:33:401984browse

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>

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!

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