WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Center an iframe with CSS (9 posts)

  1. mlcastejon
    Member
    Posted 1 year ago #

    Hello,

    I'm struggling to center an iframe. I've tried with align middle but it's not working. I've also tried with margins auto but no luck either.

    Any help on it?

    Thanks!
    Maria

  2. Andrew
    Forum moderator
    Posted 1 year ago #

  3. mlcastejon
    Member
    Posted 1 year ago #

    Andrew Nevins, thanks but I've already tried all these options :-(

  4. Andrew
    Forum moderator
    Posted 1 year ago #

    Could you link to the page with the issue?
    Where did you add those CSS modifications?

  5. mlcastejon
    Member
    Posted 1 year ago #

    The link is http://test.cmgi.ie/home/investor-relations/

    the CSS modification is on the id that I've created for it on the custom CSS (it working for the height and width but not for the align).

  6. Andrew
    Forum moderator
    Posted 1 year ago #

    Try displaying your iFrame block,
    E.g

    display: block;
  7. mlcastejon
    Member
    Posted 1 year ago #

    Not working :-(

  8. Andrew
    Forum moderator
    Posted 1 year ago #

    You still need the margin auto style

  9. mlcastejon
    Member
    Posted 1 year ago #

    Thanks! Now it works!

    Thanks very much, Andrew Nevins.
    Maria

Topic Closed

This topic has been closed to new replies.

About this Topic