Streaming live at 10am (PST)

How to center a embedded widget?


#1

I am embedding a third party affiliate code widget in my page. However, I have no idea on how to center this widget. My published page is at http://delhi.webflow.io/



#2

Hello! Can you get me a preview link?


#3

https://preview.webflow.com/preview/delhi?preview=cee924c178768ac39548b3a2709934cd


#4

Thanks!

Well, your embed widget is set to an position: absolute, which is not really needed for centering.
What you need to do to get it centered is:

  1. Remove position: absolute on your embed widget. Set it to "auto"
  2. Select your "center"-div and go down to the Typography section and set the text alignment to center.

There you go :smile:


#5

I just tried it but do not get it to center. Note that the embed code is from a third party affiliate ad server - so it is not a text but an image.


#6

Hm, okay, well I can't see the "image" since it's an embed that only can be seen when the site is publish.The embed get's centered for me, however, I noticed that it only centers the HTML embed widget, and apparently it doesn't affect the image that appears from the code in that HTML embed. It's kind of hard to get a grasp on it when I can't see the image unfortunately.
Have you tried setting the embed to margin: auto (both left and right)?


#7

You can see the published page at delhi.webflow.io

I have published it again with changes suggested by you. As you rightly said, your suggestions center the html but not the resulting image. And yes, I tried auto on both left/right margins.

Is there a way I can give you access to my account to check it out? Can I call you? Is there a PM possibility in this forum?


#8

Yes, I can, but I can't see the published editing I do from your preview link since it's only a review-only.

PM is absolutely possible. Just click my name and hit "Message".

EDIT: I've sen you a PM!


#9

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.