Centering an iframe/custom embed on a page

If you've added a custom embed to a page and it's not centered, following the below steps should help you to get it centered on your page. 

  1. Identify the iframe you want to center in the live version of the page. 
  2. Identify the ".div" class of the iframe
  3. Replace "iframe_div" in the below script with the selected ".div class"
  4. Lastly, find where the iframe has been added to the page (it's custom section), and paste a modified copy of the below script above the embed script for the iframe.
<style>
div.iframe_div {
margin: 0 auto;
}
</style>

 

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share