Notifications
Clear all

How To Center I Frame?

6 Posts
2 Users
0 Likes
551 Views
Posts: 3
Topic starter
(@sirjohn)
Active Member
Joined: 11 months ago

Hello, I am using the advanced iframe pro plugin.

 

I added an iframe to the page but it sits to the left of the page. Can we center the iframe?

 

Any information would be great. Thanks

5 Replies
TinyWebGallery
Posts: 880
Admin
(@admin)
Prominent Member
Joined: 15 years ago

You can use use the "style" attribute and there you can add the needed styles.  

style="margin-left:auto;margin-right:auto"

See: https://www.w3schools.com/css/css_align.asp

Best regards,

Michael

Reply
Posts: 3
Topic starter
(@sirjohn)
Active Member
Joined: 11 months ago

Thank you for replying. I am using Wordpress and the block editor, where would I edit the css? Would this be required for each page/iframe? Thanks

Reply
TinyWebGallery
Posts: 880
Admin
(@admin)
Prominent Member
Joined: 15 years ago

Hi,

you have all options. 

If you use the block editor you can add it in the free text field on the right with

style="margin-left:auto;margin-right:auto"

If you like to have it for all iframes: Got to the administration of advanced iframe and add the setting "style" on the basic tab. I will then be applied to all iframe.

Best regards,

Michael

 

Reply
Posts: 3
Topic starter
(@sirjohn)
Active Member
Joined: 11 months ago

Hi Michael,Thanks for the reply and specifiying where to put the code.

 

I have tried both options, however the iframe won't move from the left of the screen.

Is it possible to request support and provide site details in private?

Thank you

Reply
Page 1 / 2