how to center a tweet?

tic picture tic · Jun 25, 2013 · Viewed 12.9k times · Source

Twitter provides the code to embed a tweet. For example I have:

<blockquote class="twitter-tweet"><p>NoSQL space gradually becoming SlowSQL space.</p>&mdash; Big Data Borat (@BigDataBorat) <a href="https://twitter.com/BigDataBorat/statuses/349216251853287425">June 24, 2013</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

I have tried to enclose the above code into a tag <div style="margin:auto">...</div> but the tweet appears yet aligned on the left. How to center it horizontally in a whatever page?

Answer

Panayiotis Georgiou picture Panayiotis Georgiou · Dec 11, 2016

I came across the same issue and the only solution worked for me was to change the class

Before

<blockquote class="twitter-tweet" data-lang="en">

After

<blockquote class="twitter-tweet tw-align-center" data-lang="en">