css - Hiding code from html validation wrecks formatting -
so grabbed twitter widget twitter site website. have twitter widget in html code so
<div id="twitter"> <a class="twitter-timeline" href="https://twitter.com/twitternamehere" data-widget-id="331777195053809665"> tweets @twitternamehere</a> <script type="text/javascript" >!function(d,s,id){var js,fjs=d.getelementsbytagname(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getelementbyid(id)){js=d.createelement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentnode.insertbefore(js,fjs);}}(document,"script","twitter-wjs");</script> </div>
the validation xhtml1.0 of course picks data widget id not valid. tired in html 4 also. decided wrap code inside cdata tag hide validation. so,
<![cdata[ twitter widget + div ]]>
this messes formatting widget supposed be
#twitter{ overflow:hidden; position: absolute; top:96px; left:116px; }
the cdata tag makes move other div formatting in centre of screen. tried wrapping twitter script inside cdata , had no luck.
is there anyway can around formatting error, or there anyway can hide code validation in other way?
comment if need more details.
thanks
Comments
Post a Comment