• having some validation problems. Not sure why, as im using if IEs for css. also the adsense is exactly the same as another button i use, and that validates fine. any pointers would be good.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The issue isn’t your CSS validating, it’s your HTML. Follow the instructions on the page you linked to.

    Thread Starter Alex Cragg

    (@epicalex)

    yeah i know that. What i meant was i use an if IE to change the css sheet that is displayed, and that if IE statement validates fine.

    So the advice the validator gives is hard to follow when it tells you you are doing it right somewhere else!

    with reference to the adsense button, the xhtml that isnt validating was copied and pasted from an adsense button that is validating on another site of mine.

    This is why i posted! the errors are bemusing and confusing

    it’s

    <![endif]-->

    not:

    <!--[endif]-->

    Thread Starter Alex Cragg

    (@epicalex)

    yeah, i know its no help when people are looking, but i was playing around to see if that was the problem, you must have looked at a time when it was the second way.

    its now changed back to <![endif]-->.

    when i did change it to the second, incorrect, version though, all the other errors with the goog adsense went away, which makes me think its a prob somewhere with the endif and if Ie bits.

    if you could have another look please?

    youre nesting comments.. you might want to look at this:

    https://www.cssplay.co.uk/menu/adsense.html

    the nesting is the tricky part since you need to add more — things.

    Thread Starter Alex Cragg

    (@epicalex)

    hmmm… i dont seem to be able to work this out. Ive done some googling and found out some more about nesting comments, putting —- to end one and start another, but my comments are separated by the call for javascript etc.

    the article you suggested didnt really help, maybe i missed the point?

    i got rid of two of the errors by placing the comments in a div as opposed to the div being included in the comments.

    still cant figure this

    A hack:

    <script type="text/javascript"><!--
    google_ad_client = "pub-2079691368092450";
    google_ad_width = 110;
    google_ad_height = 32;
    google_ad_format = "110x32_as_rimg";
    google_cpa_choice = "CAAQgcyTlwIaCBn5DarF8MgCKLPGvnUwAA";
    google_ad_channel = "3011547893";
    //--></script>
    <!--[if IE]>
    In a new Web Standards initiative, we recommend upgrading your browser to Firefox2.
    <script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    <![endif]-->

    That will get rid of the nested comment structure. You don’t need to have the first piece of script inside the IF thing, since it won’t do anything without the remote script that follows.

    Thread Starter Alex Cragg

    (@epicalex)

    worked a charm.

    didnt know that adsense javascript worked like that, worth knowing.

    thanks guys and gals

    Thread Starter Alex Cragg

    (@epicalex)

    thought this was resolved until i saw that none of the ads, apart from the one in question, are now showing on my site.

    But seeing my site without the ads made me think it looks better without. But a few here and there wouldn’t do any harm, so…

    any other solutions to this? keeping valid XHTML, and displaying other ads?

    thanks guys

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘XHTML Validation’ is closed to new replies.