Aligning Tweet To Center Of Page

  • Unknown's avatar

    Hello,

    My name is Gavriel Wilkins. Owner of the Won For All blog, centered around the Cleveland Cavaliers. I was reaching out to ask members of the blogging community through WordPress, exactly how do I go about centering a given tweet onto my page.

    If anyone might be able to be of assistance, I would greatly appreciate it.

    Thank you!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hello @wonforallblog
    Do you want to center the tweet embeds?

    If yes, follow these steps:
    1. Go here: https://wordpress.com/posts/ and edit the article to center the tweets.
    2. Now select the twitter embed code, and click on the Align Center icon: https://prnt.sc/femed2
    3. Click UPDATE button on the top right corner.

    Let us know if this helps. Thanks! 🙂

  • Unknown's avatar

    Yes, I am trying to center the given tweet embeds that I have for my article. I tried your provided methods to no avail. You stated for me to go and posts on my given WordPress page, and edit my specific article to center my given tweets. Yet when I do so, it is not allowing me to do so at all. Even with the selected embed code via Twitter.

  • Unknown's avatar

    @wonforallblog
    Okay so if that did not work, you can use inline CSS to centerize the tweet embeds.

    To do that:
    1. Go here: https://wordpress.com/posts/ and edit the article to center the tweets.

    2. Find the twitter embed code, click on that and switch to the HTML tab.

    3. You might find that your twitter embed code is inside a ‘div’ tag with the class ’embed-twitter’ probably like this:

    <div class="embed-twitter">
    [tweet https://twitter.com/WordPress/status/806218721966571520]
    </div>

    NOTE: If you cannot find this div tag, just add it to your embed code as shown above, but replace the tweet link with your desired tweet.

    4. Now, to centerize this tweet we will use CSS flexbox, like this:

    <div class="embed-twitter" style="display: flex; justify-content: center; margin-bottom: 20px;">
    [tweet https://twitter.com/WordPress/status/806218721966571520]
    </div>

    NOTE: Replace the tweet link with your desired tweet, if you are using the above code.

    5. Repeat the above steps for all twitter embeds on that article.

    6. Click UPDATE button on the top right corner.

    Let us know if this helps!

  • The topic ‘Aligning Tweet To Center Of Page’ is closed to new replies.