테이블 헤더의 높이가 고정되어 있고 너비가 헤더 셀 내용을 기준으로 조정되어 있는지 확인해야합니다. (헤더 텍스트는 최대 두 줄로 표시됩니다.) 스타일을 사용하여 어떻게 할 수 있습니까? 또한 표 행의 너비가 머리글 행 너비와 동일해야합니다 (즉, 머리글 행에서 너비를 결정).헤더의 고정 높이와 너비 변경 (HTML 테이블)
참고 : 현재 "트랜잭션 부서 소유자 별칭 이름"이 나타납니다. 그것은 두 줄로 올 필요가 있습니다.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title><link href="Styles/TestStyle.css" rel="stylesheet" type="text/css" /></head>
<body>
<div id = "divForTransactionGrid">
<div>
<table cellspacing="0" rules="all" border="1" id="grdTransactions" style="border-collapse:collapse;">
<thead>
<tr>
<th scope="col">Transaction ID</th><th scope="col">Transaction Name</th><th scope="col">Transaction Owner</th><th scope="col">Transaction Department Owner Alias Name</th>
</tr>
</thead><tbody>
<tr>
<td>1</td><td>TR1</td><td>Lijo</td><td>Lijo</td>
</tr><tr>
<td>2</td><td>TR2</td><td>Lijo</td><td>This is a test value to test the result in real time scenario. Row width should be same as header width</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
당신은 큰 문제가 파괴되어
#divForTransactionGrid
{
width: 300px;
height: 250px;
overflow:scroll;
}
몇 시간을 보내고 약간의 질문 공간을 고칠 수 있습니까? – Aristos