최근게시물 추출

최근게시물 추출

QA

최근게시물 추출

본문

이미지 섬네일을 추출 하려는데
첫줄은 가로 2개의 이미지를 추출 (여기 까지는 되는데)
그밑에에는 이미지제외 최신글을 3개 정도 추출 할려고 합니다.
이분의 어디를 손봐야 할까요.
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
    <td colspan=4 >
        <table width=100%>
        <tr>
            <td height=23 width=82%><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>  
            <?
            echo $list[$i]['icon_reply'] . " ";
            echo "<a href='{$list[$i]['href']}'>";
            if ($list[$i]['is_notice'])
                echo "<font style='font-family:돋움,굴림; font-size:9pt; color:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
            else
                echo "<font style='font-family:돋움,굴림 font-size:9pt; color:#6A6A6A;'>{$list[$i]['subject']}</font>";
            echo "</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>";
            // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
            // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }
            echo " " . $list[$i]['icon_new'];
            echo " " . $list[$i]['icon_file'];
            echo " " . $list[$i]['icon_link'];
           // echo " " . $list[$i]['icon_hot'];
            echo " " . $list[$i]['icon_secret'];
            ?></td>
   <!--<td width=18% alien="right"><?=$list[$i][datetime]?></td>-->
   </tr>
        <tr><td style="border-bottom:1px solid #ebebeb"></td></tr>
        </table></td>
</tr>
<? } ?>
그리고 메인페이지의
=latest("photo","gallery", 2, 16);
이부분도 수정해야 하는지요,

이 질문에 댓글 쓰기 :

답변 2

table. 코딩은 비추천입니다.

플렉시블한 페이지 구성을 위해서는 위의 방법이 맞지 않습니다.

<style>
div.latest_wrap {width:100%;}
div.latest_body {margin:0px; border:1px solid #ccc;}
ul.latest_ul {margin:0px; padding:5px; border:1px solid #ccc; clear:both; list-style:none;}
li.latest_li {display:block; float:left; width:33.333%; list-style:none;}
div.latest_list {margin:0px; padding:5px; height:100px;}
</style>
<div class="latest_wrap">
    <div class="latest_body">
<ul class="latest_ul">
            <li class="latest_li">
<div class="latest_list">여기에 리스트 이미지등등..</div>
    </li>
            <li class="latest_li">
<div class="latest_list">여기에 리스트 이미지등등..</div>
    </li>
            <li class="latest_li">
<div class="latest_list">여기에 리스트 이미지등등..</div>
    </li>
</ul>
    </div>
</div>

보통이렇게CSS 짜지요. Table로 짜는게 훨씬 수월 할 수 있으나.. 나중에 길이 가변폭 생각하면은 오히려
CSS 를 플렉서블하게 다루는 방법이 더 이득일것 같습니다.
수고하세요.
답변을 작성하시기 전에 로그인 해주세요.
전체 123,528 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT