최신글 썸네일 반응형으로 어떻게 해야할까요?

최신글 썸네일 반응형으로 어떻게 해야할까요?

QA

최신글 썸네일 반응형으로 어떻게 해야할까요?

답변 2

본문

아래와같이 최신글로 갤러리 썸네일을 불러옵니다.

이게 반응형일때 정사각형으로 움직여야하는데 

아래 php로 가로세로가 잡혀있어서

수정을 어떻게 해야할지 모르겠습니다.. 

%는 안먹고, 110으로 고정하자니 스크린이 커지면 정렬이 흐트러지고.. 

 

아래 소스에서 수정을 하려면 어떻게 해야할지 여쭤봅니다.. 

 

<?

if (!$width) $width = 110;
if (!$height) $height = 110;

?>

<div class="la_review">

<?
    $indexNum = 0;
    for ($i=0; $i<count($list); $i++) {
        $indexNum ++;
        $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height);
        $list[$i]['name'] = mb_substr($list[$i]['wr_name'], 0, -3).'**';


        $listHtml_s .= "
        <div class='over_cope_story' id='over_story".$indexNum."'>
        ";
    

        $listHtml_s .= "
        <div id='latast_main'>
            <a href='".$list[$i]['href']."'>
                <img src='".$thumb['src']."' >
            </a>
        </div>
        <div id='latast_main_on'>".$list[$i]['name']."님</div>        
        ";
    
        $listHtml_s .= "
        </div>
        ";
    }
    echo $listHtml_s;
    if (count($list) == 0) { //게시물이 없을 때
            echo "<div style='font-size:23px;  color:#696969; text-align:center;'>게시물이 없습니다.</div>";
    }
    ?>

 

 

이 질문에 댓글 쓰기 :

답변 2

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 950
© SIRSOFT
현재 페이지 제일 처음으로