탭메뉴 질문좀 드립니다

탭메뉴 질문좀 드립니다

QA

탭메뉴 질문좀 드립니다

본문

안녕하세요 질문좀 요청좀 드릴려고 합니다 

메인화면에 최신글로 출력해 놓은거입니다.  그런데 이상하게 게시판에 게시글 있는거에는 정상적으로 

나오지만 게시물이 없는거는 css가 겹쳐서 사진과같이 아래로 나와버리는 문제가 있습니다..

무엇때문에 그런지 정말모르겠네요 ㅠㅠ; 

고수님들 도움주시면 감사하겠습니다  

5d3b2e194fb75c88af1c69a98b90aa69_1463015606_7223.PNG





latest.skin.php부분입니다 



<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가


include_once(G5_LIB_PATH.'/thumbnail.lib.php'); // 탭라이브러리


// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
 
$thumb_w = 200;  //썸네일 가로 크기
$thumb_h = 140; //썸네일 세로 크기
//$cont_txt_max = 90; //게시판 글 내용 최대 글자 수
?>
<!-- <?php echo $bo_subject; ?> 최신글 시작 { -->


 <style>
.hall_box1 {float:left; width:1090px; height:420px;background-color: #F6F7F9;    }
.hall_box1 ul {  list-style:none; margin-left:-40px;   }
.hall_box1 li{ float:left;  margin-left:15px;margin-bottom:10px; width:200px; height:190px;background-color: #fff;  -webkit-box-shadow: 0 0 3px 1px #ddd;}
.hall_box1 li dt {width:185px; height:140px;}
.hall_box1 li dt img {width:185px; height:140px;}
.hall_box1 li p {font-size:11px;color: #959595; margin-top:5px;margin-bottom:5px;margin-left:5px;  }
.hall_box1 li strong { font-weight:700; font-size:15px; color: #000;margin-left:5px; }
 
 


  </style>


 <div class="hall_box1">
   <ul>
    <?php for ($i=0; $i<count($list); $i++) {  ?>
            <?php
			$content_max = cut_str(strip_tags($list[$i]['wr_content']), $cont_txt_max, '...');
            //echo $list[$i]['icon_reply']." ";
			echo "<li>";
			$li_thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_w, $thumb_h);
			$li_noimg = "$latest_skin_url/img/noimg.gif";
			if($li_thumb['src']) {
			$img_content = '<img src="'.$li_thumb['src'].'" width="'.$thumb_w.'" height="'.$thumb_h.'" alt="'.$list[$i]['subject'].'" title="" />';
				} else {
			$img_content = '<img src="'.$li_noimg.'" width="'.$thumb_w.'" height="'.$thumb_h.'" alt="이미지없음" title="" />';
			}	
			echo "<a href=\"".$list[$i]['href']."\">";
			echo $img_content; // 썸네일 출력
			echo "</li>";
 		}
			 
 	     	if (count($list) == 0) { //게시물이 없을 때
			echo "<li>게시물이 없습니다.</li>";
    }?>
   </ul>
  
 </div>
 
 
  
<!-- } <?php echo $bo_subject; ?> 최신글 끝 -->
 
 





탭메뉴 부분입니다 



#css_tabs { 
    font-family:'nanumgothic', '나눔고딕', 'malgun gothic', '맑은 고딕', 'dotum', '돋움', sans-serif
}
/* 탭 선택 시 표시할 요소(div) 정의(1번 탭 선택 시 첫 번째 div 요소 표시) */
#css_tabs input:nth-of-type(1), #css_tabs input:nth-of-type(1) ~ div:nth-of-type(1), 
#css_tabs input:nth-of-type(2), #css_tabs input:nth-of-type(2) ~ div:nth-of-type(2),
#css_tabs input:nth-of-type(3), #css_tabs input:nth-of-type(3) ~ div:nth-of-type(3),  
#css_tabs input:nth-of-type(4), #css_tabs input:nth-of-type(4) ~ div:nth-of-type(4),
#css_tabs input:nth-of-type(5), #css_tabs input:nth-of-type(5) ~ div:nth-of-type(5), 
	#css_tabs input:nth-of-type(6), #css_tabs input:nth-of-type(6) ~ div:nth-of-type(6),
	#css_tabs input:nth-of-type(7), #css_tabs input:nth-of-type(7) ~ div:nth-of-type(7) {
    display:none
}
#css_tabs input:nth-of-type(1):checked ~ div:nth-of-type(1),
#css_tabs input:nth-of-type(2):checked ~ div:nth-of-type(2),
#css_tabs input:nth-of-type(3):checked ~ div:nth-of-type(3),
	#css_tabs input:nth-of-type(4):checked ~ div:nth-of-type(4),
	#css_tabs input:nth-of-type(5):checked ~ div:nth-of-type(5),
	#css_tabs input:nth-of-type(6):checked ~ div:nth-of-type(6),
	#css_tabs input:nth-of-type(7):checked ~ div:nth-of-type(7) {
    display:block
}
/* 라벨 기본 스타일 지정 */
#css_tabs > label { display:inline-block; font-variant:small-caps;font-size:12px;  padding-top:10px;padding-bottom:15px; text-align:center; width:155px; height:15px;  line-height:1.8em; font-weight:700;   background:#000;
    color:#777; border:1px solid #ccc;    margin-top:40px;  margin-right:-4.5px;  }
#css_tabs > label:hover { cursor:pointer}
 
/* 선택된 라벨, 커서를 올린 라벨 스타일 지정 */
#css_tabs input:nth-of-type(1):checked ~ label:nth-of-type(1), #css_tabs > label[for=tab1]:hover {background:000;  color:#000}
#css_tabs input:nth-of-type(2):checked ~ label:nth-of-type(2), #css_tabs > label[for=tab2]:hover { background:000;  color:#000}
#css_tabs input:nth-of-type(3):checked ~ label:nth-of-type(3), #css_tabs > label[for=tab3]:hover { background:000;  color:#000}
#css_tabs input:nth-of-type(4):checked ~ label:nth-of-type(4), #css_tabs > label[for=tab4]:hover { background:000;  color:#000}
#css_tabs input:nth-of-type(5):checked ~ label:nth-of-type(5), #css_tabs > label[for=tab5]:hover { background:000;  color:#000}
#css_tabs input:nth-of-type(6):checked ~ label:nth-of-type(6), #css_tabs > label[for=tab6]:hover { background:000;  color:#000}
#css_tabs input:nth-of-type(7):checked ~ label:nth-of-type(7), #css_tabs > label[for=tab7]:hover { background:000;  color:#000}


 [code]

/* 실제 내용이 담긴 div 요소 스타일 지정 */
#css_tabs .tab1_content,
#css_tabs .tab2_content,
#css_tabs .tab3_content,
#css_tabs .tab4_content,
#css_tabs .tab5_content,
#css_tabs .tab6_content,
 
#css_tabs .tab7_content {  height:500px;}
 

 

<div id="css_tabs">

    <input id="tab1" type="radio" name="tab" checked="checked" />

    <input id="tab2" type="radio" name="tab" />

    <input id="tab3" type="radio" name="tab" />

<input id="tab4" type="radio" name="tab" />

    <input id="tab5" type="radio" name="tab" />

    <input id="tab6" type="radio" name="tab" />

    <input id="tab7" type="radio" name="tab" />

 

 

 

    <label for="tab1">스튜디오</label>

    <label for="tab2">드레스</label>

    <label for="tab3">메이크업</label>

    <label for="tab4">한복</label>

    <label for="tab5">예물</label>

    <label for="tab6">폐백/이바지</label>

    <label for="tab7">기타</label>

 

    <div class="tab1_content"><?php echo latest2("gall", "collection", 10, 23,'','',스튜디오); ?></div>

    <div class="tab2_content"><?php echo latest2("gall", "collection", 10, 23,'','',스튜디오); ?></div>

<div class="tab3_content"><?php echo latest2("gall", "collection", 10, 23,'','',스튜디오); ?></div>

 

<div class="tab4_content"><?php echo latest2("gall", "collection", 10, 23,'','',스튜디오); ?></div>

<div class="tab5_content"><?php echo latest2("gall", "collection", 10, 23,'','',스튜디오); ?></div>

<div class="tab6_content"><?php echo latest2("gall", "collection", 10, 23,'','',스튜디오); ?></div>

<div class="tab7_content"><?php echo latest2("gall", "collection", 10, 23,'','',스튜디오); ?></div>

 

 

 

</div>

</div>

[/code]  

이 질문에 댓글 쓰기 :

답변 1

.hall_box1 li{ float:left;  margin-left:15px;margin-bottom:10px; width:200px; height:190px;background-color: #fff;  -webkit-box-shadow: 0 0 3px 1px #ddd;}

이것이 먹어버리기때문입니다. 지워버리지소 아래와같이해보세요

 

.list{

    float:left;  margin-left:15px;margin-bottom:10px; width:200px; height:190px;background-color: #fff;  -webkit-box-shadow: 0 0 3px 1px #ddd

}

 

<div class="hall_box1">
   <ul>
    <?php for ($i=0; $i<count($list); $i++) {  ?>
            <?php
$content_max = cut_str(strip_tags($list[$i]['wr_content']), $cont_txt_max, '...');
            //echo $list[$i]['icon_reply']." ";
echo "<li class='list'>";
$li_thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_w, $thumb_h);
$li_noimg = "$latest_skin_url/img/noimg.gif";
if($li_thumb['src']) {
$img_content = '<img src="'.$li_thumb['src'].'" width="'.$thumb_w.'" height="'.$thumb_h.'" alt="'.$list[$i]['subject'].'" title="" />';
} else {
$img_content = '<img src="'.$li_noimg.'" width="'.$thumb_w.'" height="'.$thumb_h.'" alt="이미지없음" title="" />';
}
echo "<a href=\"".$list[$i]['href']."\">";
echo $img_content; // 썸네일 출력
echo "</li>";
  }
 
      if (count($list) == 0) { //게시물이 없을 때
echo "<li>게시물이 없습니다.</li>";
    }?>
   </ul>
  
 </div> 

 

 

 

댓글주셔서 감사합니다
 <style>
 .hall_box1 {float:left; width:1090px; height:420px;background-color: #F6F7F9;    }
.hall_box1 ul {  list-style:none; margin-left:-40px;  }
 .hall_box1 li dt {width:185px; height:140px;}
.hall_box1 li dt img {width:185px; height:140px;}
.hall_box1 li p {font-size:11px;color: #959595; margin-top:5px;margin-bottom:5px;margin-left:5px;  }
.hall_box1 li strong { font-weight:700; font-size:15px; color: #000;margin-left:5px; }
 
 .list{
    float:left;  margin-left:15px;margin-bottom:10px; width:200px; height:190px;background-color: #fff;  -webkit-box-shadow: 0 0 3px 1px #ddd

  </style>

 <div class="hall_box1">
  <ul>
    <?php for ($i=0; $i<count($list); $i++) {  ?>
            <?php
$content_max = cut_str(strip_tags($list[$i]['wr_content']), $cont_txt_max, '...');
            //echo $list[$i]['icon_reply']." ";
echo "<li class='list'>";
$li_thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_w, $thumb_h);
$li_noimg = "$latest_skin_url/img/noimg.gif";
if($li_thumb['src']) {
$img_content = '<img src="'.$li_thumb['src'].'" width="'.$thumb_w.'" height="'.$thumb_h.'" alt="'.$list[$i]['subject'].'" title="" />';
} else {
$img_content = '<img src="'.$li_noimg.'" width="'.$thumb_w.'" height="'.$thumb_h.'" alt="이미지없음" title="" />';
}
echo "<a href=\"".$list[$i]['href']."\">";
echo $img_content; // 썸네일 출력
echo "</li>";
  }
 
      if (count($list) == 0) { //게시물이 없을 때
echo "<li>게시물이 없습니다.</li>";
    }?>
  </ul>
 
 </div>
변경을 해도 동일합니다 ㅠㅠ

답변을 작성하시기 전에 로그인 해주세요.
전체 129,678 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT