View Full Version : Horizontal space to move text away from text?

11-04-2010, 01:19 PM
I am trying to give about 5px of empty space to the right of an image and 5px of empty space below it on the site i'm building; I know I can use horizontal and vertical space to do it but that also moves the image in 5px from the left edge which means it won't align with the beginning of paragraphs above and below the image.

Any other way to give that space without moving the image in or using a table?

11-04-2010, 01:59 PM
Yes, set margins on the image. Example;


<img src="images/myimage.jpg" class="imgplace">


.imgplace {margin: 0 5px 5px 0; float: left;}

I have assumed you are floating the image but remove if not required.

11-04-2010, 04:26 PM
Thanks, I'll give it a try.