Forum Moderators: open
I have found when validating a HTML page that the line:
<BODY marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
is being flagged. All of the attributes are claimed to be invalid but when I test the page with out them the lay out (designed for 800x600) suddenly shifts out of place!
Additional the validator also complains about the use of the background attribute in a TD cell (i.e. <TD CLASS="nonprintable" background="./gr/middleleft.gif"> ) despite the fact that this is an essential part of the template!
I am using HTML 4.01 Transitional. Is this a correct doctype for this kind of code?
Thanks in advance,
Rob
[edited by: Rob_1978 at 7:17 pm (utc) on Dec. 11, 2002]
CSS [webmasterworld.com] [/url] is your friend ;)
// In your css file
[pre]
body {
margin: 0;
padding: 0;
}
.tdimage {
background-image: url(/path/to/pic.gif);
}
[/pre]
Nick
<edit>Typo!</edit>
[edited by: Nick_W at 7:24 pm (utc) on Dec. 11, 2002]
I often leave such code in my pages. You could replace them with the css as suggested, but then you are aren't going to be compatible with Netscape.
I use the validator purely to find spelling typos in tags, wrongly nested tags, tags open but not closed, and other errors with the logic, structure and syntax of the HTML. I don't usually worry about including a few tags that are browser specific.
I don't really see these as errors, but more as browser incompatibilities, ones that will need to be addressed only when more browsers actually follow the agreed standards.
[edited by: g1smd at 8:19 pm (utc) on Dec. 11, 2002]