Dynadot โ€” .com Registration $8.99

[Resolved] Problem with XHTML Strict validation

Spaceship Spaceship
Watch

-Rasmus-

NamePros AddictEstablished Member
Impact
42
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
If you could please post the amazon code, I could correct it for you, As it is hard to see the code on the validation page.
Thanks.
 
0
•••
Sure, here it is:

Code:
<center>
<iframe
src="http://rcm.amazon.com/e/cm?t=johngrisham0a-20&o=1&p=8&l=st1&mode=books&search=john%20grisham&=1&fc1=&lt1=&lc1=&bg1=&f=ifr" marginwidth="0" marginheight="0" width="120" height="240" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe></center>
 
0
•••
Hmm, Maybe try using xHTML traditional?
 
0
•••
Doesn't help, still have the same errors, plus a few more.
 
0
•••
Change line 5 (or where ever your similar code is) to:
<meta http-equiv="Content-Type" content="UTF-8" />

A few of the errors are for having </meta>. Instead of having it like that, end your opening meta tag with />
example: <meta name="distribution" content="global" />

Change <center> to
<div style="text-align: center;">
(and </center> to </div>)

All the rest of the errors seem to be because <iframe ..> isn't a valid XHTML object. I don't know how you can fix those.
 
0
•••
Thanks, now there's only iframe left... Is there maybe a code to wrap around the iframe so that the validator would skip that part?
 
0
•••
You could use javascript to write it.
Code:
<script type="text/javascript">
document.write('Put your iframe code here');
</script>
Put that where you want the iframe.
 
0
•••
That didn't work, the ad just disappeared (maybe because I'm using Textpattern CMS).
 
0
•••
I just tested the following and it works:
Code:
<script type="text/javascript">
document.write('<iframe src="http://rcm.amazon.com/e/cm?t=johngrisham0a-20&o=1&p=8&l=st1&mode=books&search=john%20grisham&=1&fc1=&lt1=&lc1=&bg1=&f=ifr" marginwidth="0" marginheight="0" width="120" height="240" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe>');
</script>
 
0
•••
You're right, it works. But unfortunately it still has all the validation errors.
 
0
•••
Code:
<script type="text/javascript">
<!--
document.write('<iframe src="http://rcm.amazon.com/e/cm?t=johngrisham0a-20&o=1&p=8&l=st1&mode=books&search=john%20grisham&=1&fc1=&lt1=&lc1=&bg1=&f=ifr" marginwidth="0" marginheight="0" width="120" height="240" border="0" frameborder="0" style="border:none;" scrolling="no"></iframe>');
-->
</script>
Try that. :)
 
1
•••
Excellent!

This Page Is Valid XHTML 1.1!

Thanks so much for your help, Dan. :) Rep added.
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back