作者kc655039 (NNN  )
看板Web_Design
標題[問題] Firefox中子block跳出父block
時間Wed Jan 14 14:02:41 2009
如下的code,在firefox跑,table會跳出paragraph element,(跑到下面去)
在ie6則不會。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<style>
.asdf
{
border: solid 1px black;
}
</style>
<body>
<p class="asdf">
<table class="asdf">
<tr>
<td>adfadfasdf</td>
</tr>
</table>
</p>
</body>
</html>
如果把dtd拿掉就會正常了,可以請教關鍵在哪兒嗎?
謝謝各位!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.115.150.200
※ 編輯: kc655039 來自: 59.115.150.200 (01/14 15:58)
推 chph:IE6的顯示結果是不正確的, 自己想想段落包表格合不合理... 01/14 22:38
→ kc655039:謝謝一樓提醒…慚愧 01/14 23:46