The Halftone Illusion

The CSS techniques used here are nothing more than the normal way of putting edges over a textured background.

The thing that bends the eye here is the edges themselves. Our eyes want to see the dots as the edge over a white background. But in truth, the white is the edge, the 'dots' are just transparency (Scroll down to the images if you don't believe me!) The shadows reinforce the illusion by giving solidity to what isn't there and forcing the eye away from the white and onto the pattern. They also make the page seem to 'float' over the false 'white background', when in reality the white is layered over the top of the page!

For variation, the 'edge' can have a pattern or a color, too. Or no shadows. Each is a different effect.

Bonus! If you have Adobe Photoshop (or Photoshop Elements) you can download the original .PSD files to make your own colors or patterns! Please be sure to give me credit if you use 'em on your page--thanks!

Mix 'n' Match!
972 possible combinations!!
< Left Edge









Right Edge >










Backgrounds






To save space, Left, Right and Both styles are all displayed on this page plus solid and textured backgrounds. Have fun changing edges and backgrounds with the buttons below (turn one edge off to see the left or right styles.) Do you think it works better with with contrasting or similar colors? What's your favorite combination? (Javascript required to change the colors by changing the CSS class of the body)

Some combinations to try:

Note: One of the backgrounds is FIXED in the body block. If works, but kind of spoils the illusion.

Back to CSS Main

Images and Sample CSS:

halftone-fireshd
141x159
halftone-fireshd.gif
halftone-fireshd-r
141x159
halftone-fireshd-r.gif
halftone-shd
141x159
halftone-shd.gif
halftone-shd-r
141x159
halftone-shd-r.gif
halftone-blushd
141x159
halftone-blushd.gif
halftone-blushd-r
141x159
halftone-blushd-r.gif
halftone-wht
141x159
halftone-wht.gif
halftone-wht-r
141x159
halftone-wht-r.gif
halftone-blk
141x159
halftone-blk.gif
halftone-blk-r
141x159
halftone-blk-r.gif
halftonefine-blk
42x61
halftonefine-blk.gif
halftonefine-blk-r
42x61
halftonefine-blk-r.gif
halftonefine-wht
42x61
halftonefine-wht.gif
halftonefine-wht-r
42x61
halftonefine-wht-r.gif
halftonefine-gry
42x61
halftonefine-gry.gif
halftonefine-gry-r
42x61
halftonefine-gry-r.gif
goldenflow
256x256
goldenflow.jpg

369x100
sand.gif
grass
256x256
grass.jpg
subtlefuge
256x256
subtlefuge.jpg
whitewood
100x100
whitewood.jpg
This time the checkerboard IS the image, there is no actual transparency here!
64x64
TRANSBACK.gif
<HEAD>
<STYLE><!--
BODY {
  background: url(grass.jpg) #0a0;
  color: #fff;
  height:100%;
  margin:0;
}  
.Shadow-L {
  background: url(halftone-shd.gif) repeat-y left;
  padding-left:136px;
/* use this padding too if not using right side
  padding-top:1em;
  padding-bottom:1em;
  padding-right:1em;
*/
}
.Shadow-R {
  background: url(halftone-shd-r.gif) repeat-y right;
  padding-right: 136px; 
  padding-top:1em;
  padding-bottom:1em;
  padding-left:0;
/* use this padding-left if not using left side
  padding-left:1em;
*/
}
--></STYLE></HEAD>
<BODY><DIV class=Shadow-L><DIV class=Shadow-R>
(content)
  .
  .
  .
</DIV></DIV></BODY>
If you 'View Source' on this page you'll see the colors and images broken up into classes to facilitate the javascript switching, but you can stick it right in the BODY block as above.
Annuit Coeptis. Novus Ordo Saeclorum. E Pluribus Unum. Veni Vedi Vici. Et Al. Ad Infinitum. Ad Nauseam. Vox Populi. Semper Fidelis. Modus Operandi. Terra Firma. Exitus Acta Probat. Cogito Ergo Sum. Alma Mater. Ad Hoc. Fortes Fortuna Juvat. Fronti Nulla Fides. Ignorantia Juris Neminem Excusat. Res Melius Evinissent Cum Coca. Roma Locuta Est--Causa Finita Est. Veni, Vidi, Dormivi. Ubi Fumus, Ibi Ignis. Alea Jacta Est. Tabula Rasa. Vacca Foeda. Die Dulci Fruere. Cave ne ante ullas catapultas ambules. Sentio aliquos togatos contra me conspirare. Illiud Latine Dici Non Potest. Sona Si Latine Loqueris. Braccae Tuae Aperiuntur. Annuit Coeptis. Novus Ordo Saeclorum. E Pluribus Unum. Veni Vedi Vici. Et Al. Ad Infinitum. Ad Nauseam. Vox Populi. Semper Fidelis. Modus Operandi. Terra Firma. Exitus Acta Probat. Cogito Ergo Sum. Alma Mater. Ad Hoc. Fortes Fortuna Juvat. Fronti Nulla Fides. Ignorantia Juris Neminem Excusat. Res Melius Evinissent Cum Coca. Roma Locuta Est--Causa Finita Est. Veni, Vidi, Dormivi. Ubi Fumus, Ibi Ignis. Alea Jacta Est. Tabula Rasa. Vacca Foeda. Die Dulci Fruere. Cave ne ante ullas catapultas ambules. Sentio aliquos togatos contra me conspirare. Illiud Latine Dici Non Potest. Sona Si Latine Loqueris. Braccae Tuae Aperiuntur. Annuit Coeptis. Novus Ordo Saeclorum. E Pluribus Unum. Veni Vedi Vici. Et Al. Ad Infinitum. Ad Nauseam. Vox Populi. Semper Fidelis. Modus Operandi. Terra Firma. Exitus Acta Probat. Cogito Ergo Sum. Alma Mater. Ad Hoc. Fortes Fortuna Juvat. Fronti Nulla Fides. Ignorantia Juris Neminem Excusat. Res Melius Evinissent Cum Coca. Roma Locuta Est--Causa Finita Est. Veni, Vidi, Dormivi. Ubi Fumus, Ibi Ignis. Alea Jacta Est. Tabula Rasa. Vacca Foeda. Die Dulci Fruere. Cave ne ante ullas catapultas ambules. Sentio aliquos togatos contra me conspirare. Illiud Latine Dici Non Potest. Sona Si Latine Loqueris. Braccae Tuae Aperiuntur. Annuit Coeptis. Novus Ordo Saeclorum. E Pluribus Unum. Veni Vedi Vici. Et Al. Ad Infinitum. Ad Nauseam. Vox Populi. Semper Fidelis. Modus Operandi. Terra Firma. Exitus Acta Probat. Cogito Ergo Sum. Alma Mater. Ad Hoc. Fortes Fortuna Juvat. Fronti Nulla Fides. Ignorantia Juris Neminem Excusat. Res Melius Evinissent Cum Coca. Roma Locuta Est--Causa Finita Est. Veni, Vidi, Dormivi. Ubi Fumus, Ibi Ignis. Alea Jacta Est. Tabula Rasa. Vacca Foeda. Die Dulci Fruere. Cave ne ante ullas catapultas ambules. Sentio aliquos togatos contra me conspirare. Illiud Latine Dici Non Potest. Sona Si Latine Loqueris. Braccae Tuae Aperiuntur. Annuit Coeptis. Novus Ordo Saeclorum. E Pluribus Unum. Veni Vedi Vici. Et Al. Ad Infinitum. Ad Nauseam. Vox Populi. Semper Fidelis. Modus Operandi. Terra Firma. Exitus Acta Probat. Cogito Ergo Sum. Alma Mater. Ad Hoc. Fortes Fortuna Juvat. Fronti Nulla Fides. Ignorantia Juris Neminem Excusat. Res Melius Evinissent Cum Coca. Roma Locuta Est--Causa Finita Est. Veni, Vidi, Dormivi. Ubi Fumus, Ibi Ignis. Alea Jacta Est. Tabula Rasa. Vacca Foeda. Die Dulci Fruere. Cave ne ante ullas catapultas ambules. Sentio aliquos togatos contra me conspirare. Illiud Latine Dici Non Potest. Sona Si Latine Loqueris. Braccae Tuae Aperiuntur. Translations Here!