본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

Improper display with <!DOCTYPE html

more options

This is the code at the top of the page:

<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">

The body code starts like this: <body topmargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> 

The page is displayed with margins top, left and right. Why? The page displays correctly when on "html" is noted at the top and nothing else prior to the head.



added formatting to display the code.

This is the code at the top of the page: <pre><nowiki><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> The body code starts like this: <body topmargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> </nowiki></pre> The page is displayed with margins top, left and right. Why? The page displays correctly when on "html" is noted at the top and nothing else prior to the head. ------ ''added formatting to display the code.''

글쓴이 the-edmeister 수정일시

모든 댓글 (1)

more options

Is there a particular reason you're using those antiquated attributes instead of CSS?


<head>
…
<style type="text/css">
body { margin: 0 0 auto 0; background-color: white; }
</style>

The attributes you mention are non-standard (specific to Internet Explorer), and as such Firefox only supports them in Quirks Mode. To trigger quirks mode, omit the DOCTYPE declaration from your document (presumably you use a malformed DOCTYPE, which had the same effect).