I have a Facebook like button on my site. The site, however, uses primarily content that’s centered on the page, and the button is stubbornly left-justified. I’ve set a custom width on the button to get it more or less centered, but of course the width changes, and sometimes the nominal width includes more or less white space. This makes it look like it isn’t centered.
I think if I could get the whole 450px wide by arbitrary height (changes if profile pics of people who liked it appear) region to be shaded it’d look better and feel less off-center. How is this possible?
I just put a table element around the button:
I ended up just leaving a border around it without even using the bgcolor attribute. I guess bgcolor is deprecated and using html tables is bad form and there’s probably a way sexier CSS solution, but this got the job done.
Another probably better option, and what I did in the production site, was use an AddThis box and a bit of css to set the width of the addthis div and then set the margins on each side to be automatic (and therefore equal, centering the div).