최근게시물의 줄간 높이 조절

· 2010-10-28 (목) 11:27:02 · 1699 · 5
제목 없음-2.jpg
파란색으로 칠해진 부분을 좀 좁히고
글자와 날짜간의 간격을 좀 줄이고픈데,
당췌 꿈쩍을 안하네요 -.-;;

첨부파일

제목 없음-2.jpg (47.3 KB)
0회 2010-10-28 11:27
|

댓글 5개

2010-10-28 (목) 11:39:21
해당 소스를 올려주시면 알려드리기가 편하지만
질문 내용만으로는 ,,...일단 최신 게시물 스킨의 해당 스킨 파일을 손보시면 됩니다,
그누 설치 폴더/skin/latest/해당스킨/latest.skin.php 파일을 손보시면 되는데
해당스킨을 모르시면 위 내용이 인덱스 파일에 표시된다 가정하고 인덱스 파일 소스중
<?=latest("최신게시물 스킨명", "게시판 테이블명", 3, 26);?> 의 최신게시물 스킨명이 해당 스킨 파일이며 스킨 디렉토리 안의 latest.skin.php 파일을 수정하시면 됩니다.
2010-10-28 (목) 12:37:15
해당스킨의 latest.skin.php의 파일입니다.
날짜랑 줄간 라인, 그리고 상단 박스 일케 3개를 지웠구요.
페딩값을 암만 들었다놔도 1픽셀에서만 까딱까딱 하고 있네요 ㅎㅎ ;;
원본이랑 제가 수정한거랑 같이 구분해서 올려볼께요

------원본-------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style>
.sh_latest { width:98%; height: 100%; position: relative; }
.sh_latest dl { float:left; clear:both; display:block; margin:0; padding: 4px 4px 5px 4px; }
.sh_latest dt, dd { display:block; }
.sh_latest dt { padding-top:2px; float:left; clear:left; font-size:9pt; color:#696969; font-weight: normal; }
.sh_latest dd { padding-top:2px; width:150px; float:right; clear:right; text-align: right; }

.sh_latest_top { width: 98%; position: relative; text-align: left; background-image:url('<?=$latest_skin_path?>/img/topbase.gif'); border: 1px solid #bcbcbc; }
.sh_latest_content { width: 98%; position: relative; padding: 4px; text-align: left; border: 1px solid #bcbcbc; border-top: 0; }
.sh_latest_top * { vertical-align:middle; display:inline; }
</style>

<center>
<div class="sh_latest">
<dl class="sh_latest_top">
<dt>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><span style="font-weight: bold; color: #8781BD;"><?=$board[bo_subject]?></span></a>
</dt>
<dd>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src="<?=$latest_skin_path?>/img/more.gif" width="45px" height="17px" border='0'></a>
</dd>
</dl>
<? for ($i=0; $i<count($list); $i++) { ?>
<dl class="sh_latest_content">
<dt>
<img src='<?=$latest_skin_path?>/img/<?=$i+1?>.gif'>
<?
echo "<a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";
echo " " . $list[$i]['icon_new']. $list[$i]['icon_secret'];
?>
</dt>
<dd>
<?=$list[$i]['name']?>  <?=$list[$i]['datetime']?>
</dd>
</dl>
<? } if (count($list) == 0) { ?>
<dl class="sh_latest_content">
<dt>게시물이 없습니다용~!</dt>
</dl>
<? } ?>
</div>
<div style="clear : both;"></div>
</center>




---- 제가 수정한거 -----

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<style>
.sh_latest { width:100%; height: 109px; position: relative; }
.sh_latest dl { float:left; clear:both; display:block; margin:0; padding: 3px 1px 1px 1px; }
.sh_latest dt, dd { display:block; }
.sh_latest dt { padding-top:2px; float:left; clear:left; font-size:9pt; color:#696969; font-weight: normal; }
.sh_latest dd { padding-top:2px; width:70px; float:right; clear:right; text-align: right; }


.sh_latest_content { width: 100%; position: relative; padding: 1px; text-align: left; solid #bcbcbc; border-top: 0; }

</style>

<center>
<div class="sh_latest">

<? for ($i=0; $i<count($list); $i++) { ?>
<dl class="sh_latest_content">
<dt>

<?
echo "<a href='{$list[$i]['href']}'>{$list[$i]['subject']}</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\"><span style='font-family:����; font-size:8pt; color:#9A9A9A;'>{$list[$i]['comment_cnt']}</span></a>";
echo " " . $list[$i]['icon_new']. $list[$i]['icon_secret'];
?>
</dt>
<dd>

</dd>
</dl>
<? } if (count($list) == 0) { ?>
<dl class="sh_latest_content">

</dl>
<? } ?>
</div>
<div style="clear : both;"></div>
</center>
아고.. 복잡하네.... 과연 저런 리스트레이아웃에 dl dt를 쓰는게 웹표준일지.. div와 테이블이 맞지않을까하는 생각이 드네요..
일단 해결은 님이 수정하신 소스에서 아래처럼 적힌것을 지워주시면 될거구요.

<dd>

</dd>

그리고 그외 눈에 거슬리는건.. ㅎㅎㅎ
<center> 테그가 저기서 의미가 없는거같고..
젤아래 <div style="clear : both;"></div> 이건 지우셔도될거같고,
.sh_latest_content { 에서
text-align: left; solid #bcbcbc; border-top: 0; } 일케되있는데.. border값이 필요하시면 border:1px solid #bcbcbc; 하시고 필요없으심 0px; 해서 지우시고 ㅋ
div li 태그들을 써야만 웹표준은 아닙니다.
table 태그를 사용한다고 해서 웹표준이 아닌것도 아니고요..

위에서 처럼 div 를 사용하여 잘 안되신다면 table 태그를 이용하여 만드시는 것도 방법입니다
2010-10-29 (금) 19:26:18
-..- ㅋㅋㅋ 원래 소스가 그러는데 어떻하겠슴까만 ㅋㅋ 무튼 두분 모두 고맙습니다
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
10-10-29 조회 2,049
10-10-29 조회 1,942
10-10-29 조회 1,323
10-10-29 조회 1,919
10-10-29 조회 1,402
10-10-28 조회 1,058
10-10-28 조회 1,608
10-10-28 조회 1,617
10-10-28 조회 1,699
10-10-28 조회 1,630
10-10-28 조회 1,665
10-10-28 조회 2,956
10-10-28 조회 1,720
10-10-28 조회 1,630
10-10-28 조회 1,597
10-10-28 조회 1,267
10-10-28 조회 1,010
10-10-28 조회 1,189
10-10-28 조회 1,078
10-10-28 조회 1,700