테스트 사이트 - 개발 중인 베타 버전입니다

게시판을 아이프레임으로 가져왔습니다. 그런데 영역이 이상하게 나오네요 채택완료

나의이야기 7년 전 조회 2,289

 

 

위 사진처럼 영역이 저렇게 잡히는데 고수님들 저거 자동으로 되는방법을 좀 알려주세요

 

아이프레임 소스는

<iframe id="ifrm" width="100%" height="auto" frameborder="0" marginwidth="0" scrolling="no" src="주소"></iframe> 

 

이렇게 가져왔습니다.

css는

 

#gnbod_gallry{
    width:1100px;
    height:auto;
    margin:0 auto;
    text-align:center;
    padding:100px 0 100px 0;
}

 

ㅠㅠ

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

답변 1개

채택된 답변
+20 포인트
7년 전

</p>

<p><div class="tbl_head01 tbl_wrap">

    <table >

    <caption><?php echo $g5['title']; ?> 목록</caption>

    <thead>

    </thead>

    <tbody>

        <tr>

            <td style="border: 0px; padding: 0px 20px;">

                <iframe src="/bbs/board.php?bo_table=banner&pim=1" style="width:100%" id="bframe"

                 frameborder="0" framespacing="0" scrolling="no" height="1" onLoad="iframeAutoResize(this);"></iframe>

            </td>

        </tr>

    </tbody>

    </table>

</div></p>

<p>

<script></p>

<p>

function iframeAutoResize(h){ 

    if(h == null){ return false; } 

    (h).height = "0px"; 

    var iframeHeight= (h).contentWindow.document.body.scrollHeight; 

    (h).height=iframeHeight + 15; 

}</p>

<p><script></p>

<p>

참고 하세요.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

나의이야기
7년 전
최고!!! 아주 정확히 잘 됩니다. 감사합니다. 사랑합니다.

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

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

로그인