왜 style height가 %로 안먹히죠? ㅠ..ㅠ... > 그누4 질문답변

그누4 질문답변

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

왜 style height가 %로 안먹히죠? ㅠ..ㅠ... 정보

왜 style height가 %로 안먹히죠? ㅠ..ㅠ...

본문

height를 px로 지정하면 잘 되는데, %를 주면 전혀 안바뀌는 이유가 뭐죠??? 

   <td class=list1>
    <table border=0 cellspacing=2 cellpadding=0 width="100%" height="100%">
    <col width=><col width=100>
    <tr>
     <td><textarea name=memo id=memo cols=20 rows=8 class=textarea style=width:100%></textarea></td>
     <td style="padding-left:20px"><input type=submit rows=5 class=submit value='  글쓰기  ' accesskey="s" style="height:97%"></td>
    </tr>
    </table>

댓글 전체

아래글들보니깐.. doctype 차이점이 있어보이는듯합니다.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
이렇게 수정해셧는데..

문제만 없다면 다시 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 바꾸시면
늘어날꺼에요 -0-
아~ 수정한거는 다른 사이트에요.
그래서 이곳도 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 로 바꿨어요.

그런데, doc type 정의전에는 %가 잘 먹혔단말이어요. ㅠ..ㅠ...
테이블소스
---
<div id=comment_write style="display:none;">
<img src=<?=$dir?>/t.gif border=0 height=4><br>
<table border=0 cellspacing=1 cellpadding=1 class=line1 width=<?=$width?>>
<tr>
<td bgcolor=white>
<form method=post name=fviewcomment action=comment_ok.php onsubmit="return check_comment_submit(this)" autocomplete="off" style="margin:0px;">
<table border=0 cellspacing=1 cellpadding=8 width=100% height=120 bgcolor=white>

<input type=hidden name=page value=<?=$page?>>
<input type=hidden name=id value=<?=$id?>>
<input type=hidden name=no value=<?=$no?>>
<input type=hidden name=select_arrange value=<?=$select_arrange?>>
<input type=hidden name=desc value=<?=$desc?>>
<input type=hidden name=page_num value=<?=$page_num?>>
<input type=hidden name=keyword value="<?=$keyword?>">
<input type=hidden name=category value="<?=$category?>">
<input type=hidden name=sn value="<?=$sn?>">
<input type=hidden name=ss value="<?=$ss?>">
<input type=hidden name=sc value="<?=$sc?>">
<input type=hidden name=mode value="<?=$mode?>">
    <input type=hidden name=comment_id        id='comment_id' value=''>
    <input type=hidden name=w                id=w value='c'>
    <input type=hidden name=zsfCodeResult    id="zsfCodeResult"    value="" >

<col width=95 align=right style=padding-right:10px><col width=>
<?if(!$member['no']){?>
    <tr>
      <!-- http://www.casternet.com/spamfree/zmb/view.php?bd=manual&no=5&page=1 -->
      <td class=list0>스팸방지코드</td>
      <td class=list1>
      <img align=absmiddle src="zmSpamFree/zmSpamFree.php?zsfimg=<?php echo time();?>" id="zsfImg" alt="여기를 클릭해 주세요." title="클릭하시면 다른 문제로 바뀝니다. SpamFree.kr" onclick="this.src='zmSpamFree/zmSpamFree.php?re&zsfimg=' + new Date().getTime();" />&nbsp;
      <input type="text" size="10" maxlength="10" name="zsfCode" id="zsfCode" onblur="checkZsfCode(this);" />&nbsp;
      </td>
    </tr>
<tr>
<td class=list0><font class=list_eng><b>Name</b></td>
<td class=list1><font class=list_han><?=$c_name?></font></td>
</tr>
<?}?>
<?=$hide_c_password_start?>
<tr>
<td class=list0><font class=list_eng><b>Password</b></td>
<td class=list1><input type=password name=password <?=size(8)?> maxlength=20 class=input></td>
</tr>
<?=$hide_c_password_end?>
<tr>
<td class=list0>
<div onclick="document.fviewcomment.memo.rows=document.fviewcomment.memo.rows+4" style="cursor:pointer;"><font class=list_eng><b>Comment</b><br>▼</div>
<br><br><br>
비밀글&nbsp;<input type=checkbox id="wr_secret" name="wr_secret" value="1">
</td>
<td class=list1>
<table border=0 cellspacing=2 cellpadding=0 width="100%" height="100%">
<col width=><col width=100>
<tr>
<td><textarea name=memo id=memo cols=20 rows=8 class=textarea style=width:100%></textarea></td>
<td style="padding-left:20px"><input type=submit rows=5 class=submit value='  글쓰기  ' accesskey="s" style="height:97%"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>

</div>

<script language="javascript">
function check_comment_submit(f) {

  // 비회원일 때는 ajax captcha-이름-패스워드를 확인
  <? if (!$member[no]) { ?>
  if (!checkFrm())
      return false;
  if(!f.name.value) { alert("이름을 입력하세요"); f.name.focus(); return false; }
  if(!f.password.value) { alert("패스워드를 입력하세요"); f.password.focus(); return false; }
  <? } ?>

if(f.memo.value.length<10) {
alert("코멘트는 10자 이상 적어주세요");
f.memo.focus();
return false;
}
return true;
}
</script>

<? if (!$member[no]) { ?>
<script type="text/javascript" src="script/zmspamfree.js"></script>
<? } ?>
css 소스
=----
BODY { margin:5px; padding:5px;} /* html, body 사이의 간격을 지정 */

BODY,TD,input,DIV,form,TEXTAREA,center,pre,blockquote {font-size:9pt;font-family:굴림;color:888888}

select,option {font-size:9pt;font-family:tahoma;color:13485D;background-color:B4D2DE}

table { align:left;}

TD {line-height:140%, align:left; text-align:left;}

body{
scrollbar-face-color:#CCCCCC;
scrollbar-highlight-color: #DDDDDD;
scrollbar-3dlight-color: #EEEEEE;
scrollbar-shadow-color: #CCCCCC;
scrollbar-darkshadow-color: #EEEEEE;
scrollbar-track-color: #EFEFEF;
scrollbar-arrow-color: #DDDDDD;
}

a:link    {color:black;text-decoration:none;}
a:visited {color:black;text-decoration:none;}
a:active  {color:black;text-decoration:none;}
a:hover  {color:#444444;text-decoration:underline}

.head {border:solid 1 black;font-size:9pt;color:black;background-color:white;height:19px}
.textarea {border:solid 1;border-color:347088;font-size:9pt;color:042330;background-color:white;}
.input {border:solid 1;border-color:739BAB;font-size:9pt;color:042330;background-color:white;height:19px}
.submit {border:solid 1;border-color:1F556A;font-size:9pt;color:black;background-color:50889F;height:19px}
.button {border:solid 1;border-color:1F556A;font-size:9pt;color:black;background-color:50889F;height:19px}

.thm7pt {font-family:tahoma;font-size:7pt}

.ment {border:1 solid; border-color:e7e7e7; background-color:fafafa; font-size:9pt; table-layout:fixed}
.ment_text {color:666666;font-size:9pt;line-height:140%;padding:10px;}

.line1 {background-color:#B4D2DE; padding:0}
.line2 {background-color:#D7EDF2; padding:0}

.title {background-image: url(list_back.gif); background-repeat-x; height:33px;}
.list0 {background-color:#EEF3F6; height:25px; font-size:9pt;}
.list1 {background-color:#F7FAFB; height:25px; font-size:9pt;}

.title_han {color:FFFFFF;font-weight:bold;font-size:9pt}
.list_han {color:13485D;font-size:9pt;text-decoration:none;text-decoration:none}

.title_eng {font-family:tahoma;color:FFFFFF;font-weight:bold;font-size:8pt;text-decoration:none}
.list_eng {font-family:tahoma;color:13485D;font-size:8pt;text-decoration:none}
.submit {border:solid 1;border-color:1F556A;font-size:9pt;color:black;background-color:50889F;height:19px}  <<< css 정의부분에 높이가 이미 지정되어서 그런건 아닐지요.

height:19px 빼시고 해보세요.
<input type=submit rows=5 class='submit submit_plus' value='  글쓰기  ' accesskey="s" ><<클래스에 submit_plus 추가하시고

css 정의부분에 .submit_plus { height:97%;} 추가해보세요

.submit
.submit_plus

submit 가 submit_plus 보다 위에 있어야 될거 같아요
아~ 감사합니다. firebug에도 그런기능이 있네요. 와~우~
요긴데 해보니까 height:100%가 잘 적용되어 있어요. ㅠ..ㅠ...

http://bugsboard.co.kr/zboard.php?id=free_talks&no=71
ㅋㅋㅋ 찾았습니다. 불당님

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

문제없다면 위에 지정되어있는걸 아래껄로 바꿔보셔요

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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