테이블 패딩
테이블 패딩
표의 테두리와 내용 사이의 간격을 제어하려면 padding<td> 및 <th> 요소 의 속성을 사용하십시오 .
예
th, td {
padding: 15px;
text-align: left;
}
<!DOCTYPE html>
<html>
<head>
<style>
table, td, th {
border: 1px solid #ddd;
text-align: left;
}
table {
border-collapse: collapse;
width: 100%;
}
th, td {
padding: 15px;
}
</style>
</head>
<body>
<h2>The padding Property</h2>
<p>This property adds space between the border and the content in a table.</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Savings</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
<td>$100</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
<td>$150</td>
</tr>
<tr>
<td>Joe</td>
<td>Swanson</td>
<td>$300</td>
</tr>
<tr>
<td>Cleveland</td>
<td>Brown</td>
<td>$250</td>
</tr>
</table>
</body>
</html>

게시판 목록
퍼블리셔팁
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 947 | CSS | 8년 전 | 1565 | ||
| 946 | CSS | 8년 전 | 2232 | ||
| 945 | CSS | 8년 전 | 1743 | ||
| 944 | CSS | 8년 전 | 2168 | ||
| 943 | CSS | 8년 전 | 2238 | ||
| 942 | CSS | 8년 전 | 2208 | ||
| 941 | CSS | 8년 전 | 2024 | ||
| 940 | CSS | 8년 전 | 1764 | ||
| 939 | CSS | 8년 전 | 2268 | ||
| 938 | CSS | 8년 전 | 1587 | ||
| 937 | CSS | 8년 전 | 1667 | ||
| 936 | CSS | 8년 전 | 1784 | ||
| 935 | CSS | 8년 전 | 2386 | ||
| 934 | CSS | 8년 전 | 2466 | ||
| 933 | CSS | 8년 전 | 1819 | ||
| 932 | CSS | 8년 전 | 2279 | ||
| 931 | CSS | 8년 전 | 1859 | ||
| 930 | CSS | 8년 전 | 1890 | ||
| 929 | CSS | 8년 전 | 1818 | ||
| 928 | CSS | 8년 전 | 1519 | ||
| 927 | CSS | 8년 전 | 1560 | ||
| 926 | CSS | 8년 전 | 3131 | ||
| 925 | CSS | 8년 전 | 2097 | ||
| 924 | CSS | 8년 전 | 1719 | ||
| 923 | CSS | 8년 전 | 2134 | ||
| 922 | CSS | 8년 전 | 2164 | ||
| 921 | CSS | 8년 전 | 2348 | ||
| 920 | CSS | 8년 전 | 1671 | ||
| 919 | CSS | 8년 전 | 2510 | ||
| 918 | CSS | 8년 전 | 1818 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기