Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-04-2012, 02:41 AM   PM User | #1
cineweekly.com
Regular Coder

 
cineweekly.com's Avatar
 
Join Date: Aug 2010
Posts: 484
Thanks: 14
Thanked 3 Times in 3 Posts
cineweekly.com can only hope to improve
Chronic validators, how do you validate errors from social media buttons?

My site is totally validated, except for 13 errors and 2 warnings caused by the code provided to me by Facebook and Twitter for their "Like" and "Follow" buttons. How do you validation die-hards get around this?

http://www.urlgone.com/ee2144/
__________________
¿¿¿ curious ???
cineweekly.com is offline   Reply With Quote
Old 12-06-2012, 04:42 AM   PM User | #2
Matt Boldt
New Coder

 
Join Date: Jul 2009
Posts: 28
Thanks: 2
Thanked 3 Times in 3 Posts
Matt Boldt is an unknown quantity at this point
I don't think you're going to like the answer. You don't have control over social plugins at all. So you can't edit their code to successfully validate it.

To be honest, I'd take the validation results with a grain of salt. So long as you don't commit any major crimes, all those CSS errors and "divs don't belong here" don't really hurt anything.
Matt Boldt is offline   Reply With Quote
Old 12-06-2012, 09:22 AM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,465
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
You could cheat by adding the social media code from JavaScript so that it gets added after you do your validation - provided you are using HTML and not XHTML.

That doesn't make their garbage into HTML but it does at least get rid of the errors relating to their garbage from the HTML that you are validating (which is effectively that part of your page that isn't their code).

Google provide a valid variant for their +1 links, with Facebook their like link is valid HTML and just needs a / added if you are using XHTML. The Twitter tweet button has two invalid attributes but the rest is valid.

With XHTML the invalid garbage would stop the page displaying so you would have to rewrite their code to be valid in order to use it.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:01 PM.


Advertisement
Log in to turn off these ads.