사이즈 문의드립니다.
본문
아래 가로 1200 세로 600을 가로세로 100%로 만들고 싶습니다. 모바일에 작업하는거라서요
직접 코드에 $thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], 100%, 100%);
이렇게 작성하니 에러가 나서요 어떻게 작업해야하나요
아래는 원문입니다.
if ($options) list($width, $height, $wrap_width, $content_length) = explode(',', $options);
if (!$width) $width = 1200;
if (!$height) $height = 600;
if (!$content_length) $content_length = 120;
<?php
for ($i=0; $i<count($list); $i++) {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height);
$linker = "<div style='font-size:1.2em'>".cut_str(get_text(strip_tags($list[$i]['wr_content'])),40)."</div>";
if ($is_admin) {
$linker .= "<br/><a href='".$list[$i]['href']."' class='btn btn-skin btn-slide'>".$list[$i]['subject']."</a>";
}
?>
답변 2
올려주신 코드에는 썸네일 출력 부분이 안 보여서 정확히 파악이 안돼는데
썸네일이 출력되는 곳 id 나 class 에 img {width:100%;height:100%} 를 넣어주면 됩니다.
이런 식으로..
<style>
#img_thum img {width:100%;height:100%}
</style>
<div id="img_thum">썸네일출력부분</div>
100% 100% 일때는 썸네일을 만들지 않고 원파일을 불러오시면 되겠습니다