Validation: How to Validate a Google +1 Button - Plus 1 Button - in XHTM 1.0 Strict and how to align a google +1 buttin

The Google Plus 1 button does not Validate in XHTML Strict 1.0.  It also does not align properly.

Here is the solution:  (Step 1 and 2 deal with the Validation, step 3 deals with aligning the button)

1. Paste the following Code just before your opening <body> tag:

</script>
  <!-- Plus one Google -->
  <link rel="canonical" href="http://www.braveheartweddings.co.uk/" />
<script type="text/javascript" src="https://apis.google.com/js/plusone.js%22%3E%3C/script>

2. Paste the following where you want your button to go:

<div id="plusone">
  <div class="g-plusone"></div>
 </div>

3. In you CSS, paste in the following (this will center align the button):

#plusone{text-align:center; margin:auto; margin-top:20px};

Comments

Popular posts from this blog

Umbraco - Reset the Admin Password via SQL Server

Create a .NET Contact Form that Gets the Last Url Visited in C# Can also be Used in Umbraco

Umbraco Macro for IFrame when Embedding Video, Vimeo Universal Player, or other types of IFrame on to a Page XSLT version and Razor Version