Code Snippet
Base64 Encode of 1x1px Transparent GIF
Just in case you need one. You can stretch it out to fill space as needed.
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
Or a black one:
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">
Very very handy!
where should i use it?
HTML Emails maybe, just a guess though.
I use a transparent icon as cursor for one of my Narrowcasting solutions. That way, when you focus the browser window, the mouse disappears. Very neat trick. Set the cursor to none with a fallback to a transparant image. Works cross platform, cross browser.
the purpose of hiding the cursor is?
THe purpose could be HTML5 Videos (cursor hiding like on youtube)
Maybe will be useful write also where we can use this code.
Can i use it with an href link to retrieve clicks statistics?
http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever
wow thanks, i use it in combination with lazyload jQ plugin
Good one… But IE7 will not support data URI, is there any alternative for that?
IE does if you serve it in an MHTML
http://www.phpied.com/the-proper-mhtml-syntax/
Thanks but I donĀ“t understand the aplication of this code. Icons of 1×1?
I think 2×1 would far more useful.
Yes, the point being to create a small file size. Anyway, you can always expand the file using the
heightandwidthattributes. However, this would only be useful in HTML e-mails, as using spacer GIFs on webpages isn’t very good web design.Give a demo. Plz.
Sounds like lots of n00bs around who weren’t around to remember the necessity ofthe venerable 1px x 1px transparent gif hack.
Brings back memories. Mostly painful ones. :-)
DigWP
A book and blog co-authored by Jeff Starr and myself about the World's most popular publishing platform.
Quotes on Design
Design, like Art, can be an elusive word to define and an awfully fun thing to have opinions about.
HTML-Ipsum
One-click copy to clipboard access to Lorem Ipsum text that comes wrapped in a variety of HTML.
Bookshelf
Hey Chris, what books do you recommend? These, young fertile mind, these.