WordPress.org

Forums

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

  1. mlcastejon
    Member
    Posted 2 years 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 Nevins
    Forum moderator
    Posted 2 years ago #

  3. mlcastejon
    Member
    Posted 2 years ago #

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

  4. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

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

  5. mlcastejon
    Member
    Posted 2 years 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 Nevins
    Forum moderator
    Posted 2 years ago #

    Try displaying your iFrame block,
    E.g

    display: block;
  7. mlcastejon
    Member
    Posted 2 years ago #

    Not working :-(

  8. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

    You still need the margin auto style

  9. mlcastejon
    Member
    Posted 2 years ago #

    Thanks! Now it works!

    Thanks very much, Andrew Nevins.
    Maria

Topic Closed

This topic has been closed to new replies.

About this Topic