Center embedded images in WordPress

  • Unknown's avatar

    I’m trying to center an image that I’ve embedded from Getty Images on my WordPress blog. But it’s not working.
    This is one of the versions of my tries:
    <div class=”alignright”>
    <div class=’getty embed image’ style=’background-color:#fff;display:inline-block;font-family:’Helvetica Neue’,Helvetica,Arial,sans-serif;color:#a7a7a7;font-size:11px;width:100%;max-width:594px;’>

    Embed from Getty Images</div><div style=’overflow:hidden;position:relative;height:0;padding:66.666667% 0 0 0;width:100%;’><iframe src=’//embed.gettyimages.com/embed/607814904?et=Ch_RwrNoS8553TitFLzFLw&viewMoreLink=off&sig=CcSmRr77z3tO4mjhMgQMnoWhFjgL9udtW1C9MkSrrFU=&caption=true’ width=’594′ height=’396′ scrolling=’no’ frameborder=’0′ style=’display:inline-block;position:absolute;top:0;left:0;width:100%;height:100%;margin:0;’></iframe></div><p style=’margin:0;’></p></div>
    </div>

  • Unknown's avatar

    Hi,

    Try this:
    <div align="center">[getty src="607814904" width="594" height="396"]</div>

  • Unknown's avatar

    In my tests, the code created by using the align center tab in the editor toolbar doesn’t work. So
    <p style="text-align: center;">[getty src="607814904" width="594" height="396"]</p>
    does not appear centered.

  • Unknown's avatar

    I mean the ‘p style’ alignment code isn’t working with Getty Images shortcode for some unknown reason.

  • The topic ‘Center embedded images in WordPress’ is closed to new replies.