WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mlcastejon
    Member
    Posted 10 months 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 10 months ago #

  3. mlcastejon
    Member
    Posted 10 months ago #

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

  4. Andrew
    Forum Moderator
    Posted 10 months ago #

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

  5. mlcastejon
    Member
    Posted 10 months 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 10 months ago #

    Try displaying your iFrame block,
    E.g

    display: block;
  7. mlcastejon
    Member
    Posted 10 months ago #

    Not working :-(

  8. Andrew
    Forum Moderator
    Posted 10 months ago #

    You still need the margin auto style

  9. mlcastejon
    Member
    Posted 10 months ago #

    Thanks! Now it works!

    Thanks very much, Andrew Nevins.
    Maria

Reply

You must log in to post.

About this Topic