Back in December, there was a post '.. Make the gaps stop' by 'cdxrevvved' where some suggestions about validation were given. I validate my pages using Homesite and thought I would try http://validator.w3.org as suggested in that post.
I got the a few minor errors regarding 'alt' in my image tags which were easily fixed but I got two additional errors that I am unable to resolve.
1.
<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> which was suggested by Zach Elfers that I've been using for a long time.
Stefan responded with.....
Now we can rip out that proprietary crapcode you just added (marginheight="0" marginwidth="0" leftmargin="0" topmargin="0")
and suggested the use of..
body {margin:0;}
But this does not work in NS4xx. Is there a 'valid' fix other than don't use NS4xx, upgrade?
2.
I use the following in-line script to insert a date on numerous pages ('today' is derived in an external script)
1. That should really be body {margin:0px} and users of version 4 browsers do need to upgrade. However, said users - and users in general - really don't give a south end of a north bound rat about your margins.
2. It sounds like there might be something else going on, but try the following:
<script type="text/javascript">
<!--
document.write('<div class="date">'+today+'<\/div>');
//-->
</script>
And note that using the LANGUAGE attribute with the SCRIPT element will put Netscape in a special standards non-compliant mode. Said attribute was depricated for a reason and unless you're using some legacy DTD the validator ought to flag that.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Thanks Charles. The <\/div> solved the second part. It's possible that the <div class="date"> was not considered a valid opening <div> tag!
users of version 4 browsers do need to upgrade. However, said users - and users in general - really don't give a south end of a north bound rat about your margins.
Here's why (I think) I need to zero the margins.
I'm using a 'repeat-x' background image at the top of my page which needs (I want) to go up against the edge. I then match other images over the top of this. So the position of these images is important. In addition, on other pages, I use 'position:absolute' (required if using DHTML in NS4xx) to position other image-type effects that need to match over existing images.
If I do not zero the margins, the images do not position correctly. Also the 'default' margin in NS4xx seems to vary depending
on screen size so I cannot use the defaults as a starting point. Does that make sense??
Bookmarks