Forum Moderators: open
I am two errors away from 100% validation on most sites that I manage!
The errors that keep me from that 100% validation goal are...
Line 12, column 35:
... ad="preloadImages();" marginheight="0" marginwidth="0" backg ...
^Error: there is no attribute "MARGINHEIGHT" for this element (in this HTML version)Line 12, column 35:
... s();" marginheight="0" marginwidth="0" background="images/ti ...
^Error: there is no attribute "MARGINWIDTH" for this element (in this HTML version)
These two attributes in my body tags are to control the margins in NS4. I've tried everything that I am aware of in getting these to work in external .css and cannot figure it out. Probably because there is no workaround if I want "0" margins in NS4.
Anyone care to chomp at this one a bit?!
I tried the margin: -20px; as indicated and that works. Problem is, now the IE margin is at -20px even though I have the margins specified as 0px in my css. It looks like this now...
body{
margin-left:0px;
margin-top:0px;
margin-right:0px;
margin-bottom:0px;
background-color:#ffffff;
}
It looked like this when I added your suggestion...
body{
margin-left:0px;
margin-top:0px;
margin-right:0px;
margin-bottom:0px;
margin:-20px;
background-color:#ffffff;
}
At first I was jumping up and down for joy. Then I looked at the site in IE and saw the -20px margin, bummer! Any other suggestions?
body { position: absolute; top: 0px; left: 0px }
Works in NN 4/Mac & Win for me (as well as IE 5/Mac&Win and Opera 5/Mac&Win)
I'm actually using the positioning on a div though... so if it glitches when used directly on the body tag, try this for your CSS:
#body { position: absolute; top: 0px; left: 0px }
and this for your HTML:
<body><div id="body">
[page content here]
</div></body>
(My only non-compliance on my employer's site is wrapping a few DIVs in netscape <layer> tags for random positioning reasons... and since everyone else ignores the <layer> business, I'm not worrying about it. 99% compliance is good enough for me.)
I'm already using the a:hover for the link effects. Its the tabs at the top that use the rollover code.
P.S. As soon as I add the position: element to my css is when the javascript error appears and the rollovers don't work. Only NS4.7 though, works everywhere else.
I know, its not a big deal. But right now, its an ego thing. There has to be some way to drop the attributes from my <body> tag and "0" those margins in NS4, there has to be!
I've been bringing up this topic in various forums now for over 3 years and still have not been able to locate a solution.
At this point, I don't think there is one and I'll have to live with 99%. I hate 99%!
> I can't find out what the error is. I'm so used to using IE and have my preferences set to show me what the actual errors are and I can't figure it out in NS4.7.
In Netscape 4, you can type javascript: into the location bar to get more information on what the js error is.
JavaScript Error:
document[changeImages.arguments[i]] has no properties.
If that's so, it's probably because NN4 actually uses the javascript engine to execute css. That's a remnant of Netscape's earlier attempt at JSS (javascript style sheets) They kept their old code and used it to kludge css support up until version 6.
So how many different images do you rollover? The reason I ask is that I have a suspicion about the array fouling things up here, and you don't need to define an array to get rollover effects.
You could try to simplify your rollover code, as we developed in this thread: [webmasterworld.com...]
How very odd - you only get this error when you use css to set a body div the way mivox suggested?
Hello tedster! Adding anything to do with position: within the .css body is causing the javascript error.
Mivox and I have been communicating via sticky and she is going to provide me with an alternative to my javascript rollovers. I have some remote rollover effects and that is what we are addressing now.
Wish me luck, I've never really had to dig this far into javascript. Oh well, another sleepless night, sleepless day, they just all merge together and end up being sleepless weeks!
P.S. Take a look at the code of the home page listed in my profile. You'll see what I am up against. Maybe my designer created a nightmare for me! Either way, I'm going to get to the bottom of this and validate 100% W3C before the Sun comes up tomorrow morning! Or at least I'll try!
(edited by: pageoneresults at 10:32 pm (utc) on Feb. 26, 2002)
I've used CSS and javascript on the same page before in NN4.7, so I know it can work. I think it's just a matter of finding a nice minimalist, hand-coded free jscript and making some slight modifications.
The jscript code was automatically generated, and I can't make heads or tails of it at first glance. Word to the wise: Don't generate your jscript code with anything but a text editor. It gets ugly really quickly.
Thank you so very much for your assistance! Mivox, I just sent you an e-mail with the correct .js for the index.htm page.
Anyway, we selected a different slice option from Image Ready (I thought he was using GoLive). Instead of generating tables, we utilized the css feature and absolute positioning. There were two options available; div id and div class. I've got two test pages up that mivox and I are looking at. If you'd like the URL's, send me a sticky and I'll send you the links.
Now everything works fine in NS4+ and IE5+ on Windows. Haven't checked in Opera yet but I'm sure all will be okay knowing how Opera works. I use Opera only because all the rest of you geeks in here use it and I want to make sure that what you see is what everyone else is seeing.
Me thinks that absolute positioning is the way to go instead of using tables for the main navigation structures that are sliced and diced. I'll await further replies on the div id and div class issue to see which way we go.
Thanks again to brett, mivox and tedster for your assistance, it is much appreciated. I can't wait to put that W3C icon on my site that says I validate 100% to the W3C standards. Woohoo! Woohoo! Woohoo! I got goose bumps!
I'd like to add that the Image Ready generated css validated 100% with the W3C.
P.S. mivox just e-mailed me the bad news that the rollovers are not working in NN4.7 for the Mac. That's okay, there are probably only a handful of Mac users using NN4.7 and I'm sure they would not be concerned about the rollovers!
In the next few days, I will be updating the site in my profile to validate completely. I have been on this issue since 0700 this morning, it is now 2057, almost 14 hours non-stop, except for a few federal mandated 15 minute breaks throughout the day! ;)
P.S. There is one minor problem. When I add my DOCTYPE above the <html> it throws the IE top margin out of whack. Aw man, back to the drawing board unless someone knows of a fix, help!
Hurray! No more...
<table>
<tr>
<td>
Just trimmed quite a bit of fat out of the html too! If you are interested to see what it looks like, check out the profile and add /css-test.htm
Please forgive me, this just excites me to no end! I never realized how simple and convenient absolute positioning could be if used properly.
Oh, and for you Front Plague haters, that page was built in FP2002 with some handing coding thrown in.