파이어폭스에서 스킨의 글자름기능이 안 돼요. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

파이어폭스에서 스킨의 글자름기능이 안 돼요. 정보

파이어폭스에서 스킨의 글자름기능이 안 돼요.

본문

<? echo latest("latest_skin", "notice", 3, 70); ?>와 같이 최근게시물을 붙이는 스킨을 사용 중입니다.
위의 코드에서 70은 글자를 70에서 자르라는 것이겠죠 뭐....


익스플로러에서는 잘되는데,
불여우에서는 위의 그림 중 오른그림과 같이 상하가 늘어납니다.
즉, 말줄임이 되지 않고 있다는 것입니다. 제목이 잘리지 않고 다 나와버리는 거 보이시죠?

또 아래는 사용하는 스킨의 소스입니다.
어디를 어떻게 고쳐야 할까요?


<?
$image_height = 80; // 높이
$image_width  = 70; // 너비
?>


<table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
<tr>
<td height=28 width=27 background="<?=$latest_skin_path?>/img/ic.gif">
</td>
<td height=28 background="<?=$latest_skin_path?>/img/back.gif"><img border=0 height=2 width=1><br>
<a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#0099CC"><b><?=$board[bo_subject]?>
</b></font></a></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
 <tr><td height=5></td></tr></table>


<table width=100% cellpadding=0 cellspacing=1 border=0 style="table-layout: fixed;">
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i==0){?>
<tr>
<td width=90 rowspan=3>
<?               
echo "<a href='{$list[$i][href]}'>";
            $image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
            if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
        echo "<img src='$g4[path]/data/file/$bo_table/$image' width='$image_width' height='$image_height'  border=3 style='border-color:EFEFEF;' align=left>"; // 이미지크기
            } else
        echo "<img src='$latest_skin_path/img/noimage.gif' width='$image_width' height='$image_height' border=3 style='border-color:EFEFEF;' align=left>";
echo "</a>";
?>
</td>

<td width='*' height=22 valign=top>
<table width=100% height=30 cellpadding=0 cellspacing=1 border=0 style="table-layout: fixed;">
<tr>
<td height=22>
<nobr>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}'>";
if ($list[$i][is_notice])
echo "<font style='font-family:돋움; font-size:9pt; color:#FF5400;'><strong>{$list[$i][subject]}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#0092D6;'><b>{$list[$i][subject]}</b></font>";
echo "</a>";

if ($list[$i][comment_cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";

// if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
// if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }


?>
</nobr>
</td>
<td align=right width=60>
<a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a>
<font style="font-size:8pt; color=#949494;"><?=$list[$i][datetime]?></font>
</td>
</tr>
</table>
</td>

<tr><td height=1 background='<?=$latest_skin_path?>/img/line_width.gif'></td></tr>


<tr>
<td width='*' height=75 valign=middle align=justify><img border=0 height=8 width=1><br>
<a href='<?=$list[$i][href]?>'><font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'><?=nl2br(stripslashes(cut_str($list[$i][wr_content], 200, '....' )))?></font></a>
</td>
</tr>



<!-- 경계선 -->
<tr height=5><td colspan=2></td></tr>
<tr bgcolor=#E9E9E9 height=1><td colspan=2></td></tr>
<tr height=5><td colspan=2></td></tr>
<? }else{?>

<tr>
<td height="20" colspan=2>

<table border=0 style="table-layout: fixed;">
<tr>
<td width=280>&nbsp;
<img src='<?=$latest_skin_path?>/img/icon_li.gif'>&nbsp;

<?
        echo $list[$i][icon_reply] . " ";
        echo "<a href='{$list[$i][href]}'>";
        if ($list[$i][is_notice])
            echo "<font style='font-family:돋움; font-size:9pt; color:#FF5400;'><strong>{$list[$i][subject]}</strong></font>";
        else
            echo "<font style='font-family:돋움; font-size:9pt; color:#0099cc;'>{$list[$i][subject]}</font>";
        echo "</a>";

        if ($list[$i][comment_cnt])
            echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a>";

        // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
        // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }


        ?>

</td>
<td width=70 valign=right>
<font style="font-size:8pt; color=#949494;"><?=$list[$i][datetime]?></font>
</td></tr></table>

</td>
</tr>

<? } ?>
<? } ?>

<? if (count($list) == 0) { echo "<tr><td colspan=4 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
  • 복사

댓글 전체

글자수를 70 이 아니라 24 정도로 맞추어야 맞겠군요

<HTML>
<BODY>
<table width=50 cellpadding=0 cellspacing=1 border=0 style="table-layout: fixed;">
<tr><td>111111111111111111111122222222222222222</td></tr>
</table>
</BODY>
</HTML>
위 코드를 화일로 저장해서 IE 와 FF 에서 불러 보세요
IE는 글자 중간에서 잘리고 FF는 끝까지 다 나옵니다..그 이유는? table-layout: fixed
글자가 넘치지 않게 하시려면 텍스트 부위를 <div style="overflow:hidden;"> 으로 둘러싸주는 것도 한 방법입니다.
table-layout: fixed; 는 다른 브라우저에서는 작동 안하는 경우가 많거든요..
아.. 두가지 다 안돼네요... 뭐 다른 방법은 없을까요?
글자수를 70으로 놓는 것은 1680 해상도의 모니터에서도 전체화면에 탄력적으로 대응하기 위해서인데요....
© SIRSOFT
현재 페이지 제일 처음으로