Forum Moderators: open

Message Too Old, No Replies

Site not working 100% on Mozilla

         

webboy1

9:51 am on Jun 16, 2003 (gmt 0)

10+ Year Member



We recently found out that one of the competitions on one of our sites was not worknig correctly on Mozilla.

I have been reading up on Mozilla to see what could be causing this problem.

My initial conclusion is that it is something to do with the Layers used within the page. A couple of other pages using the same ASP/SQL could work fine, but this particular draw doesn't. The only difference is that it uses layers.

Not sure if this could be the cause, and really im looking for any Q&A's or support links or advice about ASP insert pages not working correctly on Mozilla, as im not to sure where to start looking to fix the problem.

All help appreciated

Webboy

tedster

9:56 am on Jun 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know I sound like a broken record on this point -- but does the page validate? That's the first port in a storm. Sometimes a problem is fixed by the apparently smallest of things.

webboy1

10:19 am on Jun 16, 2003 (gmt 0)

10+ Year Member



The submit button has validation on it.

Sometimes a problem is fixed by the apparently smallest of things

I completley agree with this, so i apologise for making you feel that you are a broken down record player.

However, the site that is causing the problems is one that we have recently took over management for, so while getting used to someone elses coding, i am also having to learn about a browser that i have not yet had the pleasure, nor time, to find out more about.

Could it be the validation that is causing the problem? Are there optional ways to write it so that it is compatible with mozilla at all?

Nick_W

10:22 am on Jun 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



tedster means does the HTML Validate [validator.w3.org] to W3C standards...? ;-)

Nick

webboy1

2:39 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



Aaaaaahh! My apologies tedster!

I tried running the page on the link provided by nick_w. It seems that the page is not picked up because it doesn't have the <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> line within the coding.

A bit annoying really. The guys who originally built the site were not the tidiest of coders, so my initial guess would be that even if the above line were added to allow a validation check.....it would be far from passing.

Could this be the cause of the problem via Mozilla?

I don't have a huge knowledge of Mozilla, however from what i have heard (which could be wrong), it was built with site usability in mind, therefor sites have to be pretty much perfect to run properly on Mozilla.

Do you think bringing the page up to W3C standards(which i should do anyway) would fix the problem?

Could there be other causes that you know of?

futureX

3:54 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



w3c validation really doesnt mean anything to me...

There is only one real browser you need to optimize for, and thats IE, after that the other 2% of people, use Mozilla and Opera, which work fine if you use a bit of common sense and css. One site I have hs around 400 "errors" on it but it looks exactly the same in IE, Opera and Mozilla.

It tells me that leftmargin="0" in the body tag is an error, it may not be supported by all browsers, but neither is the CSS attribute margin-left: 0px; so I use both to be sure, if a browser doesnt support the function it will be ignored.

It also doent like me emedding tags, as if "<a href="blah"><span style="style5"></span></a>" is going tobe any different if the </a> and the </span> were the other way round. It also tells me that I cant have the <a href> before another tag...

And what does this mean "Line 81, column 212: document type does not allow element "CENTER" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag" huh? all i did was write a center tag...

It takes too much time to fix all these "errors" maybe I just write my HTML weird, maybe I just put my tags the wrong way round, but if it works in 99.99% of users browsers then whats the problem.

papabaer

5:32 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I tried running the page on the link provided by nick_w. It seems that the page is not picked up because it doesn't have the <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> line within the coding.

A bit annoying really. The guys who originally built the site were not the tidiest of coders, so my initial guess would be that even if the above line were added to allow a validation check.....it would be far from passing.

Could this be the cause of the problem via Mozilla?

Now your getting close.

w3c validation really doesnt mean anything to me...

It takes too much time to fix all these "errors" maybe I just write my HTML weird, maybe I just put my tags the wrong way round, but if it works in 99.99% of users browsers then whats the problem.

webboy1, did you inherit the site from futureX?

Use the W3.org Validator...
& learn to code.

tedster

6:17 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Warning, MODERATOR RANT TO FOLLOW

First, let me say that I'm not trying to single out any one particular member here. The pattern comes up so often that I decided to be a bit less polite and a bit more straight ahead. Maybe someone reading this thread will get what I'm saying and make more money because of that. That's my intention.

The following quote comes from this Forum's Charter [webmasterworld.com]. It's been there since the day Brett opened this shop.

I didn't write this particular line, but I do agree with it 100%

Special Note
We do NOT do "please review my site" requests on WebmasterWorld.
If you need a site review, please type your url into the formbox
at [validator.w3.org<...]

In that spirit, anyone with a question about cross-browser rendering of their HTML should first check to see that their code is valid. If you don't have valid code, how can you expect different browsers to treat it the same way? This isn't fuzzy logic here, you know?

With non-validating code, you almost guarantee that there will be rendering problems. You've tied the browsers' shoe laces together, so of course they don't walk very well.

As I mentioned early on, validating is the first step in any HTML de-bug. I validate every page I write, and almost every time I do an edit, no matter how small. It's just become a reflex because IT SAVES ME TIME AND MAKES MY SITES WORK FOR THE GREATEST NUMBER OF VISITORS.

My company recently got a new client because the President used her new web-enabled mobile phone to look at some work we'd done, and the site looked great.

Now I never looked at that site on a cell phone when I developed it 4 years ago. Pretty much all there was back then was WAP, anyway. But I did validate the HTML, and that's all it took to have my 4 year old code render sweetly on a brand new small screen browser.

With valid code, I do much less cross-browser testing. With valid code I don't spend long hours struggling to get a layout to look the way I want it to -- and then, even when I succeed, I still don't know why it worked.

Valid code = Money in the bank

End of MODERATOR RANT

pageoneresults

6:41 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Warning, second MODERATOR RANT TO FOLLOW...

I've been validating for over two years now. With help from members here on how to understand the validator and the errors that may be generated, I worked my way into that less than 5% (guess) of the web that validates.

It tells me that leftmargin="0" in the body tag is an error, it may not be supported by all browsers, but neither is the CSS attribute margin-left: 0px; so I use both to be sure, if a browser doesnt support the function it will be ignored.

Uh hum, margin:0px; is supported by the standards compliant browsers I've tested in, and it works in IE! ;) If you are looking for a zero margin fix, here it is...

body {
top: 0;
left: 0;
margin: 0;
padding: 0;
}

Give me a site that has 100 errors, I'll clean them up and not do anything else. Within a few months, that sites visibility will increase. Don't believe me? Try it!

There is no excuse today not to validate. Most of the excuses are pure laziness. Some are valid when it comes to large sites built years ago that use certain underlying technologies. But for most of us, validation should be the first thing we address before anything else.

I don't think any of us really know what the spider does when it parses invalid code. In some instances, I'm going to guess that it stops or misinterprets particular code errors. For example, any type of fatal errors such as closing tags missing.

I do know one thing for sure, ever since I started writing valid code, I've had less problems with cross browser compatibility and fewer reported bugs by users. Using the W3C validator has also helped me to understand writing valid html.

If you are stuck in a WYSIWYG environment, there is a good chance that you will not be able to validate your sites. Why? Because those editors may use browser specific code which is not valid html, but it works as intended in most browsers.

The W3C has been trying for years to push writing valid code. These past 18 months have been an eye opener for many and now the W3C is finally starting to get the respect that it deserves.

End of second MODERATOR RANT.

universalis

7:05 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



I'll second Tedster's rant. Number one priority when your site doesn't work in a particular browser - validate the code. This doesn't mean that a valid page will always work, but you will have already excluded the vast number of problems caused by such muck as improperly-nested elements, browser-specific html, unclosed tags, missing attributes and the rest of it.

...as if "<a href="blah"><span style="style5"></span></a>" is going tobe any different if the </a> and the </span> were the other way round...

There is a huge difference - you obviously don't have any understanding of how browsers parse a page. Improperly-nested elements screw with the DOM tree that the browser is constructing, and whereas the HTML specification gives instructions on how to deal with valid markup, it gives no clue as to what to do with invalid "tag soup". Each browser deals with this situation in a different way - IE tries hardest, making an ill-formed DOM if necessary to cope with the situation. Mozilla duplicates nodes for the improperly-nested elements, opening and closing them to try to compensate for the error. Opera uses yet another method. (Note, I'm not an expert on browser-building, so I hope this limited explanation holds together.) This can lead to wildly varying results when it comes to interpreting your html, css or scripts.

If you don't validate your code, you're left looking for a needle in a haystack as far as working out bugs - and, to be frank, we can't help you further. Even valid markup is hard enough to understand sometimes - your tag soup is not worth us trying to get our heads round. Valid code also indicates that you have at least a vague clue about what you're doing - rather than throwing something together any old way and hoping it will hold together, then criticising the browser if your teetering, smoldering heap of code breaks in anything other than the version of IE on your work machine.

futureX

12:25 am on Jun 18, 2003 (gmt 0)

10+ Year Member



There is a huge difference - you obviously don't have any understanding of how browsers parse a page. Improperly-nested elements screw with the DOM tree that the browser is constructing
My point is that it works regardless...

If you don't validate your code, you're left looking for a needle in a haystack as far as working out bugs - and, to be frank, we can't help you further.
Like I said, my websites work fine in the 3 major browsers. And my point was also that validation seems to be the "wow" thing at the moment with people racing to get it valid for no real reason.

pageoneresults

12:29 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



And my point was also that validation seems to be the "wow" thing at the moment with people racing to get it valid for no real reason.

It's not really a "wow" thing as you call it but more of a requirement as we move forward with web development. If you expect your site to perform as it should across all the major browsers then validation is important.

Valid for no reason? Wow, that is a pretty bold statement. I can give thousands of reasons to validate but I'll refer you to the W3C where they list all of the reasons on tens of thousands of pages.

You either validate or, stagnate. One or the other! ;)

grahamstewart

12:47 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Validate: and you have a site that stands a very good chance of working on pretty much every modern browser out there - including phones, PDAs, fridge browsers, TV set-tops. Plus you have a site that can be read properly by spiders and other bots so your PageRank will increase and you will get more customers. Plus your site will be more accessible to people using access technology. Plus your site will be 'future-proof' and will continue to work correctly on new browser versions.

Don't validate and you have a site that looks okay on the exact version of Internet Explorer that you tested it in. It may look horrible in other versions (past or future). It allmost certainly looks horrible in other browsers.

That sounds like a "reason" to me.

It tells me that leftmargin="0" in the body tag is an error, it may not be supported by all browsers

That is NOT why it is reported as an error. Validation is NOT about which browsers your site will work in - its about whether you have written HTML that follows the W3C standards.

leftmargin="0" is not a valid attribute in HTML4.01
and <center> is not in the language at all.

Why? Because they are both settings that are to do with the presentation of the page and HTML is supposed to be about the structure of the document not its presentation. Presentation should all be handled in CSS.

Why is it some people have so much trouble letting go of the early 90's style of tag soup HTML?

Writing valid code makes my life much easier, not harder!

futureX

1:06 am on Jun 18, 2003 (gmt 0)

10+ Year Member



leftmargin="0" is not a valid attribute in HTML4.01
but it works.

you all seem to be missing the point, if it works fine in browsers that 99.999% of (general) surfers use, then theres no point in making it "valid", if it aint broke, dont fix it...

grahamstewart

1:21 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think its me/us that is missing the point here futureX.

It is broke! HTML was not properly formalised in the early stages and its causing more and more problems as the language develops.

Above all else its about being professional. If the guy that built your house used glue instead of nails, screws then he would be breaking the building standards. "But it works" would not be a valid defense.

There are standards that exist for our profession. They are published by the W3C [w3.org] - the same folk that essentially founded the net. These standards are written with the best interests of users and developers in mind.

Blindly ignoring these standards will not make them go away. More and more websites are realising the benefit of being standards-compliant. As this happens the focus will shift to browsers supporting these standards-compliant sites (this is already happening with the introduction of things like "Quirks" rendering mode and enforced standards like XHTML).

g1smd

1:32 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Uhh, I was gonna rant as well, but I see most of the points are already adequately covered here.

I'll just add that a few hours spent at [validator.w3.org...] is time well spent. You can manually set the !DOCTYPE, while checking, if the page does not include it.

There are plenty of htmlforums that can help you sort out wonky code, if you don't understand the error messages, some of which can be a tad cryptic at times.

tedster

1:37 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is only one real browser you need to optimize for, and thats IE

futureX, you have a knack for overstating your position, don't you. It's almost as if you were intentionally trying to provoke a reaction ;)

leftmargin="0" is not a valid attribute in HTML4.01
and <center> is not in the language at all

Ouch - leftmargin has never been in the language, but <center> still is. It's just that <center> is deprecated, but it's still valid [w3schools.com]. If you use it in an HTML 4.01 page you will get a validator warning, but that's not the same as an error.

Ok, now I'm going to take the other side of this "validation issue."

Depending on a website's purpose and budget (in hours or dollars) there are good reasons, IMO, not to worry overly much about warnings.

Errors, however, are a very big deal and if you are oblivious to errors, then you're headed for trouble. But if you use a valid DTD, and you write HTML that doesn't generate true errors for that DTD, you'll be fine for a good while. Browser support for <center> will not go away soon.

However, if there's one place where browser support for valid code has been a problem, it's around the CSS alternatives for <center> and the align="center" attribute, and inconsistent browser support for what tools are available.

One site I worked on recently was so maddening cross-browser (and on a limited budget) that I finally just used <center>. It's easy, widely supported, and will not confuse anyone who ever works on the site in the future. Sure, some day it will be obsolete. And so will XHTML 2, some day.

No, <center> is not very purist, because it puts presentational information in the document, and the (very sensible) goal is only to have structural info there.

But how purist is it to validate by using text-align:center when you haven't got any text in the first place? Or to center a fixed size page by using position:absolute at left:50% and then giving it a negative margin-left of half the planned div width?

These are ugly, unintuitive kludges that happen to work on many browsers and also happen to be valid. But they're about as sensible as a spacer gif.

So I'd say its important to know where HTML is heading, and to come along at whatever speed is comfortable for you. But I agree with the pragmatism behind futureX's post.

I'm a businessman first and a geek second. I prefer valid code for all the reason I said further up in this thread, but that's no reason to get rigid.

[edited by: tedster at 6:45 pm (utc) on June 18, 2003]

pageoneresults

1:46 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



A day in the life of an indexing spider...

chomp chomp chomp chomp chomp chomp
eek! unclosed tag, skip
chomp chomp chomp chomp chomp chomp
eek! tags not nested properly, skip
chomp chomp chomp chomp chomp chomp
eek! malformed html, skip
chomp chomp chomp chomp chomp chomp
eek! malformed comments tag, skip rest of page

That is what I picture an indexing spider doing when it encounters errors in html coding. I may be way off base because many spiders have probably been programmed to overlook some of these errors. But, what about the ones it cannot overlook?

grahamstewart

1:59 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry perhaps I overstated that: <center> is no longer part of the language. It has been deprecated because it is against the underlying intent of the language and it will generate validation errors if you try and use it in anything other than a Transitional DTD.

Never had a problem with centering things in CSS myself but I sympathise with your dilemma. However, you can still write validating code that uses <center> you just have to use the right DTD.

Sure, some day it will be obsolete. And so will XHTML 2, some day.

true - but your XHTML2 will have contain a header that clearly identifies it as XHTML2 so the browser will know exactly how to render it, even if it is obsolete.

tedster

6:53 pm on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



But, what about the ones it cannot overlook?

And sometimes those old spiders have trouble with newer VALID code as well, e.g. the "short" style XHTML tags such as <meta />

The errors that can really trip up a spider or a browser are the tiny things your eye may skip right over. Such as a missing ">" which was accidentally taken away during a hand edit.

Again, not to put too fine a point on it, I give a lot of attention to validator ERRORS, but not so much to WARNINGS. And I haven't used the W3C icons anywhere so far, even when I'm entitled to.

rulive

10:11 pm on Jun 18, 2003 (gmt 0)

10+ Year Member



I see valid (no joke) points on both sides here.

I definitely think that it really depends on your targets and the product you are trying to sell them. My company might sell 10-15 of our 'products' a year and meet/exceed our sales goals. So its the big corporate types that we design for and so far we've had a couple clients tell us that the site made a difference in their decision to go with us. The site isn't W3C valid, but I'm going to make it so because I'd like to get into the habit of coding valid because I agree with the point that its really about the future. If I can get into that habit sooner, it'll make my job easier in the long-run.

I looked at a couple of the most visited sites on the web and here's what I got:
espn.com -200+ errors
cnn.com - 40 errors

rulive

pageoneresults

10:23 pm on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



rulive, we had some fun back in June 2002 with checking to see who was valid and who was not...

Search Engine HTML Validation Results [webmasterworld.com]

grahamstewart

10:30 pm on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I give a lot of attention to validator ERRORS, but not so much to WARNINGS.

I don't think W3c differentiates between the two (at least not for HTML).
It either complies with the DTD or it doesn't.

If it doesn't comply then your are writing tag soup so you shouldn't have a <DOCTYPE>.

g1smd

10:33 pm on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>> We had some fun back in June 2002 with checking to see who was valid and who was not... <<

Was it really that long ago?

Time that was updated (if anything has changed out there, that is).