You can start to see the issue even if I just use this one tweet which pushes the whole page a bit to the right.
Note the white space on left is wider than the white space on right:
I want to center align all the tweets and seems like adding {center=align width=95%} discards the {center=align} and defaults the tweet to align left.
When the site loads on mobile it takes a second until the tweet loads and during that second the width overflows. The perfectionist in me doesn’t like that.
I have more than 10 embeds and don’t want to use 95% for all of them if I don’t have to.
#2 is less important than #1 and #3 is even less important.
But I would at least want to solve for #1 and perhaps even #2 since I have many embedded tweets.
Thanks for reading and hope someone has an idea where to start
P.S - I’m using Embed and not Webflow’s native Twitter insert because the latter makes the page load slower and visually cuts off the height of the tweet.
Your alignment isn’t being disregarded. The Twitter script swaps out the entire div when it loads in the tweet card, so your original div with the center alignment isn’t even there anymore.
You need to set the max-width of the embed div to the same as the actual tweet card (which is 550px on desktop, might be something else on mobile), then center the embed div (margin-left: auto and margin-right: auto).
I can’t check this on mobile atm, so your mileage might vary there.
Unfortunately, I’m a complete noob with HTML/CSS and don’t know where to set this stuff and how.
How and where do I set the max-width and margins of the embed div?
Do I add something to the blockquote in the specific HTML embed code editor for that tweet in the CMS (if yes, what do I add?), or do I do something elsewhere that is more generic?
You do it the same way you style other stuff in a rich text field. Unbind the rich text field from the CMS collection and add a custom embed div to it. Then just click the custom embed div and set it on the right hand side with the css stuff in Webflow. Finally, rebind the field to the CMS collection.
Thanks @Fonsume but I’ve tried doing this with no success.
Seems I can’t style an HTML embed inside a rich text editor via the webflow pannels.
Am I missing something?
I see the same issue in this question:
Here’s what I’m seeing when I unbind the RTE from the CMS collection, and add an HTML Embed.
The selector field is not editable and there are no styling panels in right panel:
Didn’t know exactly how to add the breakpoint for mobile portrait, but searched a bit and managed to find how.
For future reference, here’s what I used. Posts look good on mobile and desktop now.
The only issue is still #2 above.
When the site loads on mobile it takes about 5 seconds until the tweets load and during those 5 seconds the width overflows.
But unless you have any idea how to resolve that, I think I can live with it as most of my posts will not have that many tweets