spacePixels

Syntax spacePixels (ctpixels, orientation)

Params ctpixels is the number of pixels wide or high the transparent spacer GIF should be.

orientation is an optional string, whose default is "horizontal," that specifies whether the spacer GIF should be horizontal or vertical.

Action Builds the HTML to insert an img tag that includes a transparent spacer GIF on a web page.

Returns The HTML string.

Examples spacePixels (10)
"<img src=\"space.gif" width=10 height=1 alt="\">"

spacePixels (20, "vertical")
"<img src=\"space.gif" width=1 height=20 alt="\">"

Notes It's recommended that you use the #spaceGif directive to provide the name of a spacer GIF in your #images table. Otherwise, the default spacer GIF will be used, and placed in the same folder as your HTML pages rather than in an images table.

If your site is a mainResponder site, it's required that you use the #spaceGif directive, otherwise the spacePixels macro will not work.

You can also use the #spaceGif directive to specify an absolute URL to use as the spacer GIF.

This macro is stored at html.data.standardMacros.spacePixels.

See Also imageRef

Discuss