• Hi guys, after finishing off a post I checked it out in a few browsers. It looks acceptable in firefox (latest version) but looks screwy in IE and Google Chrome (latest versions)so I went to W3C Markup Validation Service and said I had 106 errors and gave me 70 warnings and I checked out a few so hit the clean up link as processed through “HTML-Tidy” and it gave me a clean up document, now my question is; where do I paste all that code in wordpress? Because it’s given me all the code that covers all the configurations on that post.
    I hope I have explained myself properly here. I will gladly add the url and the cleaned up code if anybody asks for it but it is long. I hope somebody here knows what I’m talking about

Viewing 4 replies - 1 through 4 (of 4 total)
  • Unfortunately you can’t do it the way you are trying to. If your page was an HTML page you could just paste the revised code in the HTML page and try again.

    But the code that the Validator checks is the final HTML output of the WordPress content management system. That code is generated from many places within WordPress, and you won’t even find some of it in the form you see it in the validator output anywhere in WordPress because the content you entered content is modified by PHP functions before the browser displays it.

    When there are a lot of validator errors, cleaning up WordPress code can be time consuming. You have to find where in WordPress that code is generated from (make sure you’ve checked the View Source checkbox)

    Places that are suspect are 1) page and post content from the WordPress editor, 2) text entered in widgets, 3) plugins, and 4) theme template files.

    The good news with 106 errors is typically they cascade, which means because the browser interpreted one thing incorrectly, that one error creates other errors, which create other errors. When you locate a core underlying error, 20 or 30 errors can disappear from fixing that one.

    The most common source of pages “looking screwy” is bad HTML – paragraphs and divs and LI or UL tags that are missing, or closed in the wrong order. When the # of opening and closing DIV or P tags doesn’t match, the browser often assigns a closing DIV to the wrong opening DIV, which breaks the page layout.

    What I do with the validator’s HTML output is paste it into a text editor that highlights matching opening and closing tags. That is, a DIV at the top of a section should be matched with its closing DIV at the bottom of the section. If its matched with the wrong DIV I have to find the error and make the necessary corrections. If you don’t have an editor like that, a good free one is Notepad++

    Thread Starter swaffi

    (@swaffi)

    Thank you very much stvwlf for your most kind reply. The effort you put into it is fantastic and I appreciate it very much.
    I will do what you said in regards to pasting the code into a text editor and see how I go in editing it. I had a play yesterday with editing my post and it seems that it looks ok with firefox and google chrome now but with IE it won’t show images and my amazon widget on the sidebar.
    Thanks again for your outstanding reply
    Regards..Grant

    hi Grant

    You are welcome.

    I should make a correction to one thing I said – don’t paste the HTML code from the validator in the editor – that code is full of line numbers. Rather, click View Source in IE and paste that code into the editor. Then you are seeing what IE is seeing.

    By the way, Internet Explorer is always the most troublesome browser. Firefox renders perfectly many pages that have a lot of mangled code. IE will tend to choke on some of that same code. The good part about it is it points out to us where our code is lacking, that we wouldn’t see in Firefox.
    Steve

    Thread Starter swaffi

    (@swaffi)

    Terrific Steve, yeah I’ll do it the way you pointed out. It seems logical especially how IE is by far the worst of them, although I have not looked at safari etc. I think IE, Firefox and Google Chrome users make up the majority though.
    Thanks again, regards..Grant

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Where do I place all this code?’ is closed to new replies.