Támogatás keresése

Kerülje el a támogatási csalásokat. Sosem kérjük arra, hogy hívjon fel egy telefonszámot vagy osszon meg személyes információkat. Jelentse a gyanús tevékenységeket a „Visszaélés bejelentése” lehetőséggel.

Learn More

A témacsoportot lezárták és archiválták. Tegyen fel új kérdést, ha segítségre van szüksége.

Improper display with <!DOCTYPE html

  • 1 válasz
  • 1 embernek van ilyen problémája
  • 8 megtekintés
  • Utolsó üzenet ettől: Gingerbread Man

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.''

Módosította: the-edmeister,

Összes válasz (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).