HTML and CSS Reference
In-Depth Information
Figure H-3. Using a block spacer to create space in a
document (Netscape 4 only)
H.1.2. Mimicking the <spacer> Tag
Because only Netscape versions 4 and earlier support the
<spacer>
tag,
other browsers ignore it, ruining your carefully contrived layout. We
strongly suggest that you instead use the CSS standard
text-indent
property for identical results.
You might also emulate the
<spacer>
tag with the
<img>
tag and a spe-
cial, small image. This way, you can achieve
<spacer>
-like effects even
with browsers that don't support CSS. For an image to emulate
<spacer>
,
you'll need a GIF that is completely transparent. Because no part of the
image is ever seen, you can make it as small as you want; we recom-
mend a 1 x 1-pixel GIF image. In the following examples, our tiny 1 x
1-pixel transparent image is named
small.gif
.
To emulate a horizontal spacer of the form:
<spacer type=horizontal size=
n
>
use this
<img>
tag: