Use of Single-Pixel GIF trick to draw horizontal and vertical lines.

jim.cerny@unh.edu
updated 20-JUN-1999

This demonstrates use of the so-called "single-pixel GIF trick" made widely known by David Siegel, in conjunction with our small library of single-pixel files.

This demo uses the closest blue (hex 000066, rgb 000 000 102) that we could find in the browser-safe palette of 216 colors, to match with the blues in the new UNHINFO redesign for unvisited links (hex 00008f) and visited links (hex 00006f). We've got a small library of other single-pixel GIFs in the /Graphics/Etc library on UNHINFO. View source for more usage details.

Another way to do this, and in principle preferable, would be with the Cascading Style Sheets (CSS) box and other attributes.

horizontal line 300 pixels long

single-pixel GIF trick

vertical line 50 pixels long, default left margin

single-pixel GIF trick

vertical line 50 pixels long, set in 100 pixels

single-pixel GIF trick