ChaosXero Posted August 26, 2006 Share Posted August 26, 2006 I use Amazon Ads on a site that I maintain (it's for a library) and when I try to validate the XHTML, it goes haywire on the ad.http://validator.w3.org/check?uri=http%3A%2F%2Fnormaltac.org%2F&charset=%28detect+automatically%29&doctype=XHTML+1.0+TransitionalAnyone know why this happens and if I can fix it. It irks me when my pages dont validate. Quote Link to comment https://forums.phpfreaks.com/topic/18727-valid-xhtml-problem/ Share on other sites More sharing options...
wildteen88 Posted August 26, 2006 Share Posted August 26, 2006 As you are using XHTML Doctype you must close all tags. If you have tags that dont have a closing tag you have to have [b](space)/[/b] before >So for the link tag it should be this:<link href="final.css" rel="stylesheet" type="text/css" />the same for meta, input, hr, br tags etc or any other tag that doesnt have a closing tag.As for the errors with the Amazon Ads. You cant really fix them. Quote Link to comment https://forums.phpfreaks.com/topic/18727-valid-xhtml-problem/#findComment-80763 Share on other sites More sharing options...
AndyB Posted August 26, 2006 Share Posted August 26, 2006 [code]<link href="final.css" rel="stylesheet" type="text/css">[/code]Should be:[code]link href="final.css" rel="stylesheet" type="text/css"/>[/code]That'll fix the errors with link, meta tags etc.You can fix the Amazon errors (almost certainly). The problem is caused by the ampersands. They need to be changed from & to & either by manual editing or by changing the argument separator as described at http://www.w3.org/QA/2005/04/php-session[code]ini_set('arg_separator.output','&');[/code] Quote Link to comment https://forums.phpfreaks.com/topic/18727-valid-xhtml-problem/#findComment-80765 Share on other sites More sharing options...
ChaosXero Posted August 26, 2006 Author Share Posted August 26, 2006 Thanks a lot, I was wondering about that, didn't realize I needed a space. I'll look into the amazon ads.I'm unfamiliar with INI_SET will I have to run that once, and will it make my adresses site.org/?var=etc&var2=etc? Quote Link to comment https://forums.phpfreaks.com/topic/18727-valid-xhtml-problem/#findComment-80783 Share on other sites More sharing options...
wildteen88 Posted August 26, 2006 Share Posted August 26, 2006 No, & ; (without the space) is the html entity of & (ampersand)The link will be this in your html:[code]mysite.com/page.php?var=foo&var2=bar[/code]However when you hover over the link it'll display as:[code]mysite.com/page.php?var=foo&var2=bar[/code]It allows you to keep your page XHTML valid.However I dont think this will help, as this will only afect urls to your site and not urls going to other sites (amazon). Quote Link to comment https://forums.phpfreaks.com/topic/18727-valid-xhtml-problem/#findComment-80786 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.