높이가 길어지면 안에있는거도 따라서 길어지게 하려고 합니다.
본문
상세페이지에 폭 100%인 1번안에 2번을 추가로 넣었습니다.
초기화면은 양쪽다 높이가 535px로 고정이 되있지만, 상품추가옵션을 클릭해서 1번부분의 높이가 높아지면 아래 그림처럼 2번 아래로 1번 부분만 길어집니다.
#item_best {position:relative;margin:0 auto;min-width:1200px; min-height:535px;height:auto !important;height:535px;background:#E8E8E8;zoom:1}
#item_best2 {margin:0px auto;width:1200px}
.
[code]
<section id="item_best">
<div id="item_best2">
<!-- 상품 상세보기 시작 { -->
<?php
// 상단 HTML
echo '<div id="sit_hhtml">'.conv_content($it['it_head_html'], 1).'</div>';
// 보안서버경로
if (G5_HTTPS_DOMAIN)
$action_url = G5_HTTPS_DOMAIN.'/'.G5_SHOP_DIR.'/cartupdate.php';
else
$action_url = './cartupdate.php';
// 이전 상품보기
/*
$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id > '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id asc limit 1 ";
$row = sql_fetch($sql);
if ($row['it_id']) {
$prev_title = '이전상품<span class="sound_only"> '.$row['it_name'].'</span>';
$prev_href = '<a href="./item.php?it_id='.$row['it_id'].'" id="siblings_prev">';
$prev_href2 = '</a>'.PHP_EOL;
} else {
$prev_title = '';
$prev_href = '';
$prev_href2 = '';
}
*/
// 다음 상품보기
/*
$sql = " select it_id, it_name from {$g5['g5_shop_item_table']} where it_id < '$it_id' and SUBSTRING(ca_id,1,4) = '".substr($it['ca_id'],0,4)."' and it_use = '1' order by it_id desc limit 1 ";
$row = sql_fetch($sql);
if ($row['it_id']) {
$next_title = '다음 상품<span class="sound_only"> '.$row['it_name'].'</span>';
$next_href = '<a href="./item.php?it_id='.$row['it_id'].'" id="siblings_next">';
$next_href2 = '</a>'.PHP_EOL;
} else {
$next_title = '';
$next_href = '';
$next_href2 = '';
}
*/
// 고객선호도 별점수
//$star_score = get_star_image($it['it_id']);
// 관리자가 확인한 사용후기의 개수를 얻음
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_use_table']}` where it_id = '{$it_id}' and is_confirm = '1' ";
$row = sql_fetch($sql);
$item_use_count = $row['cnt'];
// 상품문의의 개수를 얻음
$sql = " select count(*) as cnt from `{$g5['g5_shop_item_qa_table']}` where it_id = '{$it_id}' ";
$row = sql_fetch($sql);
$item_qa_count = $row['cnt'];
// 관련상품의 개수를 얻음
if($default['de_rel_list_use']) {
$sql = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} a left join {$g5['g5_shop_item_table']} b on (a.it_id2=b.it_id and b.it_use='1') where a.it_id = '{$it['it_id']}' ";
$row = sql_fetch($sql);
$item_relation_count = $row['cnt'];
}
// 소셜 관련
//$sns_title = get_text($it['it_name']).' | '.get_text($config['cf_title']);
//$sns_url = G5_SHOP_URL.'/item.php?it_id='.$it['it_id'];
//$sns_share_links .= get_sns_share_link('facebook', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_fb_s.png').' ';
//$sns_share_links .= get_sns_share_link('twitter', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_twt_s.png').' ';
//$sns_share_links .= get_sns_share_link('googleplus', $sns_url, $sns_title, G5_SHOP_SKIN_URL.'/img/sns_goo_s.png');
// 상품품절체크
if(G5_SOLDOUT_CHECK)
$is_soldout = is_soldout($it['it_id']);
// 주문가능체크
$is_orderable = true;
if(!$it['it_use'] || $it['it_tel_inq'] || $is_soldout)
$is_orderable = false;
if($is_orderable) {
// 선택 옵션
$option_item = get_item_options($it['it_id'], $it['it_option_subject']);
// 추가 옵션
$supply_item = get_item_supply($it['it_id'], $it['it_supply_subject']);
// 상품 선택옵션 수
$option_count = 0;
if($it['it_option_subject']) {
$temp = explode(',', $it['it_option_subject']);
$option_count = count($temp);
}
// 상품 추가옵션 수
$supply_count = 0;
if($it['it_supply_subject']) {
$temp = explode(',', $it['it_supply_subject']);
$supply_count = count($temp);
}
}
?>
<!-- 오른쪽으로 이동 -->
<div style="width:1200px;float:left;position:absolute;padding-left:805px;">
<div style="height:535px;border:0px solid #ddd;background:#f1f1f1; padding:0 0 0 36px;">
<div style="padding:20px 0 19px 0;color:#555;font-size:13px;font-family:tahoma, 돋움, dotum, Gulim, sans-serif;font-weight:bold;text-shadow: 1px 1px 1px rgba(255,255,255,1);">
<p><?php echo $it['ca_name']; ?> 최근상품</p>
</div>
<?php
/**/
$list = new item_list();
$list->set_category($it['ca_id'], 1); // 1단계 분류코드 10
$list->set_list_mod(3); //한줄당 갯수
$list->set_list_row(2); //줄 수
$list->set_img_size(110, 150); //이미지 가로
$list->set_list_skin(G5_SHOP_SKIN_PATH.'/main.96.skin.php');
$list->set_view('it_img', true);
$list->set_view('it_id', true);
$list->set_view('it_name', true);
$list->set_view('it_basic', true);
$list->set_view('it_cust_price', true);
$list->set_view('it_price', true);
$list->set_view('it_icon', true);
$list->set_view('sns', true);
echo $list->run();
?>
</div>
</div>
<!-- 오른쪽으로 이동 -->
<?php
function pg_anchor($anc_id) {
global $default;
global $item_use_count, $item_qa_count, $item_relation_count;
?>
</div>
</section>
<div id="container_c">
<ul class="sanchor">
<div style="width:100%;height:35px;border-bottom:0px solid #666;">
<li><a href="#sit_inf" <?php if ($anc_id == 'inf') echo 'class="sanchor_on"'; ?>>상품정보
.
.
.
[/code]
이렇게 저렇게 하다보니 원하는모양으론 되긴했는데, 높이가 서로 달라서 어떻게 해야할지를 모르겠는데요.
어떻게 해줘야 2번 높이값이 1번 높이를 따라가나요?
답변 1
height:auto !important;height:535px;빼시고 height안주셔도 자동으로 늘어나지 않나요?안먹힌다면 display:block을 추가해보세요