테치블 수직 정렬
이 vertical-align속성은 <th> 또는 <td>에 내용의 세로 정렬 (위, 아래 또는 가운데)을 설정합니다.
기본적으로 표의 내용은 중간에 있습니다 (<th> 및 <td> 요소 모두에 해당).
다음 예제에서는 <td> 요소의 세로 텍스트 정렬을 아래쪽으로 설정합니다.
예
td {
height: 50px;
vertical-align: bottom;
}
<!DOCTYPE html>
<html>
<head>
<style>
table, td, th {
border: 1px solid black;
}
table {
border-collapse: collapse;
width: 100%;
}
td {
height: 50px;
vertical-align: bottom;
}
</style>
</head>
<body>
<h2>The vertical-align Property</h2>
<p>This property sets the vertical alignment (like top, bottom, or middle) of the content in th or td.</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>

게시글 목록
| 번호 | 제목 |
|---|---|
| 3015 |
HTML
SVG Star
|
| 3014 | |
| 3013 |
HTML
SVG Rectangle
|
| 3012 |
HTML
SVG Circle
|
| 3011 | |
| 3010 | |
| 3008 | |
| 3007 | |
| 3006 | |
| 3005 | |
| 3004 | |
| 3003 |
HTML
HTML5 Canvas
|
| 3002 |
HTML
HTML5 <footer> 요소
|
| 3001 |
HTML
HTML5 <header> 요소
|
| 3000 |
HTML
html5 태그 정의
|
| 2999 | |
| 2998 |
HTML
HTML5 <aside> 요소
|
| 2997 |
HTML
HTML5 <nav> 요소
|
| 2996 | |
| 2995 | |
| 2994 | |
| 2993 | |
| 2992 | |
| 2991 | |
| 2989 | |
| 2988 | |
| 2987 | |
| 2986 | |
| 2985 | |
| 2984 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기