표 너비와 높이
표 너비와 높이
표의 너비와 높이는 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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 1097 | CSS | 8년 전 | 2191 | ||
| 1096 | CSS | 8년 전 | 2110 | ||
| 1095 | CSS | 8년 전 | 3599 | ||
| 1094 | CSS | 8년 전 | 2285 | ||
| 1093 | CSS | 8년 전 | 1508 | ||
| 1092 | CSS | 8년 전 | 1797 | ||
| 1091 | CSS | 8년 전 | 1962 | ||
| 1090 | CSS | 8년 전 | 1924 | ||
| 1089 | HTML | 8년 전 | 4423 | ||
| 1088 | CSS | 8년 전 | 1482 | ||
| 1087 | CSS | 8년 전 | 1610 | ||
| 1086 | CSS | 8년 전 | 1518 | ||
| 1085 | CSS | 8년 전 | 1540 | ||
| 1084 | CSS | 8년 전 | 1256 | ||
| 1083 | CSS | 8년 전 | 1066 | ||
| 1082 | CSS | 8년 전 | 2164 | ||
| 1081 | CSS | 8년 전 | 1965 | ||
| 1080 | CSS | 8년 전 | 1925 | ||
| 1079 | CSS | 8년 전 | 1974 | ||
| 1078 | CSS | 8년 전 | 1670 | ||
| 1077 | CSS | 8년 전 | 1693 | ||
| 1076 | CSS | 8년 전 | 2035 | ||
| 1075 | CSS | 8년 전 | 1889 | ||
| 1074 | CSS | 8년 전 | 1701 | ||
| 1073 | CSS | 8년 전 | 1548 | ||
| 1072 | CSS | 8년 전 | 1634 | ||
| 1071 | CSS | 8년 전 | 2030 | ||
| 1070 | CSS | 8년 전 | 1614 | ||
| 1069 | CSS | 8년 전 | 1849 | ||
| 1068 | CSS | 8년 전 | 1647 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기