최신글 li를 이미지 오른쪽으로 넣고싶습니다.

최신글 li를 이미지 오른쪽으로 넣고싶습니다.

QA

최신글 li를 이미지 오른쪽으로 넣고싶습니다.

본문

 

https://sir.kr/g5_skin/8312 

 

<?php echo latest('theme/ziney_hover', 'table', 10, 22, '', '500,300,800'); // '썸네일너비,썸네일높이,최신글ul너비' ?> 


 

이 최신글 갤러리를 적용했는데여 

가로사이즈를 적당히만 늘리니까 아까처럼 비율이 엉망되지않고 

적당히 보여서 그 사이즈로 하면서

하단 제목을 오른쪽으로 옮기고 싶습니다 

소스를 봐도 잘 모르겠서서 

.latest-ziney-hover li a.link{display:inline-block; padding:4px 0; float: right;}


float:right만 추가하고 제목이 오른쪽으로갔는데요 

 

http://rhdtkd77.dothome.co.kr/ 

 

 

하단에 있는것을 아예 오른쪽으로 옮기려면 어떻게 해야될까여?

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
 
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
 
$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
$board = sql_fetch($sql);
 
if ($options) list($width, $height, $wrap_width) = explode(',', $options);
if (!$width) $width = 136;
if (!$height) $height = 96;
 
$ul_style = 'padding-top:'.($height + 10).'px;';
if ($wrap_width) {
	$ul_style .= 'width:'.$wrap_width.'px;';
}
 
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
add_javascript('<script src="'.$latest_skin_url.'/ziney_hover.js"></script>', 1);
?>
 
<ul class="latest-ziney-hover" style="<?php echo $ul_style; ?>">
<?php for ($i=0; $i<count($list); $i++) { ?>
	<li><?php
		$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);
 
		if($thumb['src']) {
			$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
		} else {
			$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
		}
		echo $img_content;
?>
<i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></li>
<?php
}
if (count($list) == 0) { //게시물이 없을 때  ?>
	<li class="nodata">게시물이 없습니다.</li>
<?php }  ?>
</ul>


도움좀 부탁드릴게요~

이 질문에 댓글 쓰기 :

답변 3

방법1
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
 
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
 
$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
$board = sql_fetch($sql);
 
if ($options) list($width, $height, $wrap_width) = explode(',', $options);
if (!$width) $width = 136;
if (!$height) $height = 96;
 
$ul_style = 'padding-top:'.($height + 10).'px;';
if ($wrap_width) {
	$ul_style .= 'width:'.$wrap_width.'px;';
}
 
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
add_javascript('<script src="'.$latest_skin_url.'/ziney_hover.js"></script>', 1);
?>
 
<ul class="latest-ziney-hover" style="<?php echo $ul_style; ?>">
<?php for ($i=0; $i<count($list); $i++) { ?>
	<li><?php
		$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);
 
		if($thumb['src']) {
			$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
		} else {
			$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
		}
		//echo $img_content;
?>

<div style="float:left;"><?php echo $img_content;?></div>

<div><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></div>

</li> <?php } if (count($list) == 0) { //게시물이 없을 때  ?> <li class="nodata">게시물이 없습니다.</li> <?php }  ?> </ul>

 

 

 

방법2

<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
 
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
 
$sql = " select * from {$g5['board_table']} where bo_table = '{$bo_table}' ";
$board = sql_fetch($sql);
 
if ($options) list($width, $height, $wrap_width) = explode(',', $options);
if (!$width) $width = 136;
if (!$height) $height = 96;
 
$ul_style = 'padding-top:'.($height + 10).'px;';
if ($wrap_width) {
	$ul_style .= 'width:'.$wrap_width.'px;';
}
 
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
add_javascript('<script src="'.$latest_skin_url.'/ziney_hover.js"></script>', 1);
?>
 
<ul class="latest-ziney-hover" style="<?php echo $ul_style; ?>">
<?php for ($i=0; $i<count($list); $i++) { ?>
	<li><?php
		$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);
 
		if($thumb['src']) {
			$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
		} else {
			$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
		}
		//echo $img_content;
?>

<table>

<tr>

<td><?php echo $img_content;?></td>

<td><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></td>

</tr>

</table>


</li>
<?php
}
if (count($list) == 0) { //게시물이 없을 때  ?>
	<li class="nodata">게시물이 없습니다.</li>
<?php }  ?>
</ul>

 

방법 1

<li>

<div style="float:left;"><?php echo $img_content;?</div>

<div><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></div>

</li>

방법2

<li>

<table>

<tr>

<td><?php echo $img_content;?></td>

<td><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></td>

</tr>

</table>

</li> 

<div style="float: left;"><?php for ($i=0; $i<count($list); $i++) { ?>
<?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);

if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
} else {
$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
}
echo $img_content;
?> </div>


<div><i></i><a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></div>


스킨이 특이한건지 div를 넣었는데 오류만 나네요 ㅜㅜ

<li>
<table><tr><td><?php
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $width, $height, false, false);

if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" class="img">';
} else {
$img_content = '<span class="img" style="width:'.$width.'px; height:'.$height.'px">No image</span>';
}
echo  $img_content;
?>  </td>
<td><i></i> <a href="<?php echo $list[$i]['href']; ?>" class="link"><?php echo $list[$i]['subject']; ?></a></td></tr></table>
</li>

요렇게 해도 오류가 나구요
li를 분리하거나 건드리는 순간
오버도 안되고 오류만 나네요 ㅜㅜ

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

회원로그인

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