채택완료

최신글 table

latest.skin.php

Copy
<table>
    <caption></caption>
        <thead>
            <tr>
                <th scope="col">NO.1</th>
                <th scope="col">NO.2</th>
                <th scope="col">NO.3</th>
                <th scope="col">NO.4</th>
            </tr>
        </thead>
        <tbody>
        <?php for ($i=0; $i<count($list); $i++) { ?>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        <?php } ?>
    </tbody>
</table>

list.skin.php

Copy
<section>
    <h2></h2>
    <?php echo latest('theme/basic', 'basic_1', 5, 23); ?>
    <?php echo latest('theme/basic', 'basic_2', 5, 23); ?>
    <?php echo latest('theme/basic', 'basic_3', 5, 23); ?>
</section>

3731885385_1572499013.1614.jpg

thead 는 한줄로 맨위에 고정시키고싶고, 여러개의 게시판에서 테이블 tbody 에 출력시키고싶은데
list.skin.php에 table코딩을 해야되는건가요?

3731885385_1572499025.8309.jpg

thead가 붙어서 그냥 하나씩 세개가 나와요 ㅠㅠ

답변 1개

채택된 답변
+20 포인트
2019-10-31 (목) 14:34:39

thead를 없애고 tbody안에 <td>에 클래스 속성을 줘서 꾸며도됩니다.

답변을 작성하려면 로그인이 필요합니다.