글자가 셀의 위에서 나오는 현상은 왜일어날까요?
본문
익스플로러 8에서는 정상적으로 내용이 나오는데
익스플러러 버전이 높은 것에서는 아래처럼 내용이 나오네. 왜그럴까요?
소스도 함께 올려놓으니 고수님들의 조언좀 부탁드립니다.
<tr>
<td height="300" style="word-break:break-all;padding:10px;">
<?
// 파일 출력
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view])
echo $view[file][$i][view] . "<p>";
}
?>
<!-- 내용 출력 -->
<span id="writeContents"><?=$view[content];?></span>
<?//echo $view[rich_content]; // view_image($view, '0', '') 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<? if ($nogood_href) {?>
<div style="width:72px; height:55px; background:url(<?=$board_skin_path?>/img/good_bg.gif) no-repeat; text-align:center; float:right;">
<div style="color:#888; margin:7px 0 5px 0;">비추천 : <?=number_format($view[wr_nogood])?></div>
<div><a href="<?=$nogood_href?>" target="hiddenframe"><img src="<?=$board_skin_path?>/img/icon_nogood.gif" align="absmiddle"></a></div>
</div>
<? } ?>
<? if ($good_href) {?>
<div style="width:72px; height:55px; background:url(<?=$board_skin_path?>/img/good_bg.gif) no-repeat; text-align:center; float:right;">
<div style="color:#888; margin:7px 0 5px 0;"><span style='color:crimson;'>추천 : <?=number_format($view[wr_good])?></span></div>
<div><a href="<?=$good_href?>" target="hiddenframe"><img src="<?=$board_skin_path?>/img/icon_good.gif" align="absmiddle"></a></div>
</div>
<? } ?>
</td>
</tr>
--------------
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resizeBoardImage(imageWidth, borderColor) {
/*
var content = document.getElementById("writeContents");
if (content) {
var target = content.getElementsByTagName("img");
if (target) {
var imageHeight = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmpWidth = target[i].width;
target[i].tmpHeight = target[i].height;
//alert(target[i].width);
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > imageWidth) {
imageHeight = parseFloat(target[i].width / target[i].height)
target[i].width = imageWidth;
target[i].height = parseInt(imageWidth / imageHeight);
// 스타일에 적용된 이미지의 폭과 높이를 삭제한다
target[i].style.width = '';
target[i].style.height = '';
}
if (borderColor) {
target[i].style.borderWidth = '1px';
target[i].style.borderStyle = 'solid';
target[i].style.borderColor = borderColor;
}
}
}
}
*/