Viewing 5 replies - 1 through 5 (of 5 total)
  • <iframe style=”margin-right:10px;”>

    first remove the styling references from your iframe code in the php file.

    then in your style.css, add the following:

    iframe {
    border:0;
    margin:0 0.5em 0.5em 0;
    width:120px;
    height:240px;
    }

    That *should* give you what you want. The key here is to give margin to the right and bottom of your iframe. I suggest 0.5em, but you may want to play with that value.

    hspace and vspace are old, deprecated attributes that are wonky at best.

    Thread Starter erusch

    (@erusch)

    Awesome, thanks guys.

    Eric

    Wonky, old or not… what I want to do is add something to the script that will automatically add vspace=10 hspace=15 to all photos inserted into a story when I click the INSERT IMAGE icon or the INSERT IMAGE FROM G2 icon. The INSERT IMAGE FROM G2 icon puts an image into the text without any word wrap at all and looks sucky. When I use the INSERT IMAGE icon that you enter a URL in, it does word wrap the text around the photo, but does not add any spacing so the photo can BREATHE. I had to manually go into the html of the story and add the vspace=10 hspace=15 coding. I want to have that done automatically with every photo I insert using the INSERT IMAGE applicator built into WordPress. HOW??????

    *Which php file???

    ==================

    *first remove the styling references from your iframe code in the php file.

    then in your style.css, add the following:

    iframe {
    border:0;
    margin:0 0.5em 0.5em 0;
    width:120px;
    height:240px;
    }

    That *should* give you what you want. The key here is to give margin to the right and bottom of your iframe. I suggest 0.5em, but you may want to play with that value.

    hspace and vspace are old, deprecated attributes that are wonky at best.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to create space around image?’ is closed to new replies.