표 너비와 높이
표 너비와 높이
표의 너비와 높이는 width및 height속성 에 의해 정의됩니다 .
아래 예제는 표의 너비를 100 %로 설정하고 <th> 요소의 높이를 50px로 설정합니다.
예
table {
width: 100%;
}
th {
height: 50px;
}
<!DOCTYPE html>
<html>
<head>
<style>
table, td, th {
border: 1px solid black;
}
table {
border-collapse: collapse;
width: 100%;
}
th {
height: 50px;
}
</style>
</head>
<body>
<h2>The width and height Properties</h2>
<p>Set the width of the table, and the height of the table header row:</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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 1157 | CSS |
zakdok
|
7년 전 | 2880 | |
| 1156 | CSS |
zakdok
|
7년 전 | 2072 | |
| 1155 | HTML |
zakdok
|
7년 전 | 3385 | |
| 1154 | CSS |
|
7년 전 | 2567 | |
| 1153 | CSS | 7년 전 | 2344 | ||
| 1152 | 기타 | 7년 전 | 2189 | ||
| 1151 | 기타 | 7년 전 | 2738 | ||
| 1150 | CSS |
|
7년 전 | 4879 | |
| 1149 | HTML |
루돌프사슴코
|
7년 전 | 3061 | |
| 1148 | 기타 | 7년 전 | 2722 | ||
| 1147 | 기타 | 7년 전 | 2112 | ||
| 1146 | 기타 | 7년 전 | 2280 | ||
| 1145 | CSS | 7년 전 | 2541 | ||
| 1144 | CSS | 7년 전 | 2120 | ||
| 1143 | CSS | 7년 전 | 2385 | ||
| 1142 | CSS | 7년 전 | 2068 | ||
| 1141 | CSS | 7년 전 | 2361 | ||
| 1140 | CSS | 7년 전 | 2144 | ||
| 1139 | 기타 | 8년 전 | 2190 | ||
| 1138 | 기타 | 8년 전 | 2005 | ||
| 1137 | 기타 | 8년 전 | 1895 | ||
| 1136 | 기타 | 8년 전 | 2102 | ||
| 1135 | 기타 | 8년 전 | 1660 | ||
| 1134 | 기타 | 8년 전 | 1880 | ||
| 1133 | HTML | 8년 전 | 3515 | ||
| 1132 | 기타 | 8년 전 | 2416 | ||
| 1131 | 기타 | 8년 전 | 2191 | ||
| 1130 | 기타 | 8년 전 | 1921 | ||
| 1129 | 기타 | 8년 전 | 1467 | ||
| 1128 | CSS | 8년 전 | 2702 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기