centralise button in table

runitdirect Feb 22, 2012 03:36AM EST

How do I centralise the button in a table? The old style we used works fine:-

<td valign="top"><div align="center"><a class="addthis_counter addthis_pill_style"></a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=runitdirect"></script>
<!-- AddThis Button END -->
</div></td>

But when I try it with this button it is aligned to the left of the table!

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=runitdirect"></script>
<!-- AddThis Button END -->

Up 0 Rated Down
runitdirect Feb 22, 2012 03:39AM EST
oops, the 1st cut of code should have been this :-

<td valign="top"><div align="center"><a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=runitdirect"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" alt="Bookmark and Share" width="83" height="16" vspace="6" style="border:0"/></a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=runitdirect"></script>
<!-- AddThis Button END -->

Will it not centralise(the second one) due to no width?
Up 1 Rated Down
Paul (AddThis Happiness Specialist) Feb 22, 2012 03:02PM EST
Try using just this:

<td valign="top" align="center">
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=runitdirect">
<img src="http://s7.addthis.com/static/btn/sm-share-en.gif" alt="Bookmark and Share" width="83" height="16" vspace="6" style="border:0"/>
</a>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=runitdirect"></script>

This question is closed to new answers.

Still need help?


General Topics

 

Reference