[Resolved] Problem with XHTML Strict validation

SpaceshipSpaceship
NamecheapNamecheap
SpaceshipSpaceship
Watch

-Rasmus-

NamePros AddictEstablished Member
Impact
42
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
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
Close
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
Close
Hmm, Maybe try using xHTML traditional?
 
0
Close
Doesn't help, still have the same errors, plus a few more.
 
0
Close
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
Close
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
Close
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
Close
That didn't work, the ad just disappeared (maybe because I'm using Textpattern CMS).
 
0
Close
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
Close
You're right, it works. But unfortunately it still has all the validation errors.
 
0
Close
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
Close
Excellent!

This Page Is Valid XHTML 1.1!

Thanks so much for your help, Dan. :) Rep added.
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back