Could someone help explain why Chrome (Version 78.0.3904.97) doesn't adhere to flexbox css rules when trying to center a Twitter timeline on a web page?
I've encountered an issue where attempting to center the Twitter timeline using the code provided by Twitter for embedding it into a webpage is proving difficult in Chrome, while it works perfectly fine in Safari.
Screenshot of Safari displaying the Twitter timeline centered within the twt class div Screenshot of Chrome showing the Twitter timeline left-aligned within the twt class div
/* HTML snippet */
<div class="twt">
<a class="twitter-timeline" data-width="640" data-height="860" href="https://twitter.com/PremierLake?ref_src=twsrc%5Etfw">Tweets by PremierLake</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
/* Flexbox CSS */
.twt {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
align-content: stretch;
width: 100%;
height: 860px;
}
Notes: I have attempted using non-flexbox traditional positioning methods. I prefer not to use absolute positioning as it would disrupt the flow of surrounding elements on the page. I have searched through Twitter's developer notes but found no solution for centering a timeline. Please note that this is different from centering a single tweet, as the Twitter timeline consists of multiple tweets from a single feed.