< Back

Document Subject: Vertical Space in HTML web pages
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#vspace or http://A555F9/nn.nsf/ByAlias/vspace

Vertical space on web pages is a bit of a faff, using two <br> always seems to make too big a gap. Here is one solution.




I got fed up with not having full pixel control of vertical whitespace so I looked again for a solution.

This seems especially difficult in Lotus Notes designer,  i used to put small font and returns in but this is a horrible fudge.

Here is what i came up with:

After an  Iframe you don't need a <br>, but after text or an image you need a <br> , then put:

<img vspace=2 height=1 width=1 src='wdot.jpg'><br>

Change vspace to whatever you need, it seems you need to put height=1 and width=1 else some browsers ignore the vspace bit.

Some sort of src is needed, and if src="" or src='' in the code some browsers also ignore it all.

You do not need to put in an actual image, it works the same as a broken image, this would slow the page down from loading, probably best to put in an actual image but ...

This seems fine on Internet Explorer 6 and Firefox 1.07

NB I got adapted this idea from: http://www.dsiegel.com/tips/wonk7/vertical.html  Thanks!