그누보드 게시판 table tr height 값
본문
맨위 사진처럼 한개나 15개 미만으로쓰면 높이에맞춰서 자동으로 맞춰집니다. tr 높이를 따로 정할순 없는건가요 글이 하나있으면 맨위에부터 하나씩 내려가가할려고하는데요 도와주세요!!
답변 2
원하시는 게 이게 맞는지 모르겠지만 그림만으로 판단할 때
상단 번호 제목 글쓴이 테이블을 따로 분리하면 되긴 합니다.
기본 스킨 기준으로 list.skin.php 에서 아래 코드에서 빨간색 부분만 원본 코드와 비교해서 살펴보세요.
테이블이 위아래 2개로 분리되었습니다.
원래 있던 테이블에서 번호 제목 글쓴이 부분을 위에 새로 만든 테이블로 이동시킨 겁니다.
마지막 부분에 </div>도 있으니 빠트리지 마시고요.
이렇게 하고 아래 테이블 td height 값 조정하면 위에서부터 그 간격에 맞게 내려올 겁니다.
<div class="tbl_head01 tbl_wrap">
<table>
<caption><?php echo $board['bo_subject'] ?> 목록</caption>
<thead>
<tr>
<th scope="col">번호</th>
<?php if ($is_checkbox) { ?>
<th scope="col">
<label for="chkall" class="sound_only">현재 페이지 게시물 전체</label>
<input type="checkbox" id="chkall" onclick="if (this.checked) all_checked(true); else all_checked(false);">
</th>
<?php } ?>
<th scope="col">제목</th>
<th scope="col">글쓴이</th>
<th scope="col"><?php echo subject_sort_link('wr_datetime', $qstr2, 1) ?>날짜</a></th>
<th scope="col"><?php echo subject_sort_link('wr_hit', $qstr2, 1) ?>조회</a></th>
<?php if ($is_good) { ?><th scope="col"><?php echo subject_sort_link('wr_good', $qstr2, 1) ?>추천</a></th><?php } ?>
<?php if ($is_nogood) { ?><th scope="col"><?php echo subject_sort_link('wr_nogood', $qstr2, 1) ?>비추천</a></th><?php } ?>
</tr>
</thead>
</table>
<div style="min-height:500px">
<table>
<tbody>
<?php
for ($i=0; $i<count($list); $i++) {
?>
<tr class="<?php if ($list[$i]['is_notice']) echo "bo_notice"; ?>">
<td class="td_num">
<?php
if ($list[$i]['is_notice']) // 공지사항
echo '<strong>공지</strong>';
else if ($wr_id == $list[$i]['wr_id'])
echo "<span class=\"bo_current\">열람중</span>";
else
echo $list[$i]['num'];
?>
</td>
<?php if ($is_checkbox) { ?>
<td class="td_chk">
<label for="chk_wr_id_<?php echo $i ?>" class="sound_only"><?php echo $list[$i]['subject'] ?></label>
<input type="checkbox" name="chk_wr_id[]" value="<?php echo $list[$i]['wr_id'] ?>" id="chk_wr_id_<?php echo $i ?>">
</td>
<?php } ?>
<td class="td_subject">
<?php
echo $list[$i]['icon_reply'];
if ($is_category && $list[$i]['ca_name']) {
?>
<a href="<?php echo $list[$i]['ca_name_href'] ?>" class="bo_cate_link"><?php echo $list[$i]['ca_name'] ?></a>
<?php } ?>
<a href="<?php echo $list[$i]['href'] ?>">
<?php echo $list[$i]['subject'] ?>
<?php if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><?php echo $list[$i]['comment_cnt']; ?><span class="sound_only">개</span><?php } ?>
</a>
<?php
// if ($list[$i]['link']['count']) { echo '['.$list[$i]['link']['count']}.']'; }
// if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
if (isset($list[$i]['icon_new'])) echo $list[$i]['icon_new'];
if (isset($list[$i]['icon_hot'])) echo $list[$i]['icon_hot'];
if (isset($list[$i]['icon_file'])) echo $list[$i]['icon_file'];
if (isset($list[$i]['icon_link'])) echo $list[$i]['icon_link'];
if (isset($list[$i]['icon_secret'])) echo $list[$i]['icon_secret'];
?>
</td>
<td class="td_name sv_use"><?php echo $list[$i]['name'] ?></td>
<td class="td_date"><?php echo $list[$i]['datetime2'] ?></td>
<td class="td_num"><?php echo $list[$i]['wr_hit'] ?></td>
<?php if ($is_good) { ?><td class="td_num"><?php echo $list[$i]['wr_good'] ?></td><?php } ?>
<?php if ($is_nogood) { ?><td class="td_num"><?php echo $list[$i]['wr_nogood'] ?></td><?php } ?>
</tr>
<?php } ?>
<?php if (count($list) == 0) { echo '<tr><td colspan="'.$colspan.'" class="empty_table">게시물이 없습니다.</td></tr>'; } ?>
</tbody>
</table>
</div>
</div>
tr의 height라는 값이 어차피 td의 height값이 커지면 자동으로 커져서 별 의미는 없을 듯 한데요.
현재 정확한 질문의 내용이 무엇인지 질문의 요지를 잘 이해가 되지 않습니다.