Recent Notes

Displaying keyword search results 1 - 3
Created by James on January 10, 2011 15:20:10    Last update: February 03, 2012 10:10:14
Dojo ShrinkSafe: : command line utility written in Java, based on Rhino - JavaScript engine written in Java. Douglas Crockford's JSMIN: : command line utility written in C, can download MS-DOS exe. Dean Edwards' Packer: : online tool, or .NET, Perl, PHP application. YUI Compressor: : command line utility written in Java. Google Closure Compiler : command line Java application, web application, or RESTful API. One problem is, the compressor utility may not be 100% reliable. So make sure to test the compressed script.
Created by James on September 07, 2010 03:11:39    Last update: January 11, 2011 20:28:33
I didn't know how hard it was to vertically align something to the middle until I had to do it. An excellent writeup about the various techniques (or should I say hacks?) to achieve this is here: Here I present a technique with the help of jQuery. To make it simple, what I'm doing is to display a single line of text in the middle of the page instead of at the top. The markup is made simple because the logic is moved to JavaScript. There are two requirements to make this work: The parent container uses relative positioning jQuery code added to re-position the content with absolute positioning <!doctype html> <html> <head> <title>Vert... For some reason, the following code did not work although...
Created by James on July 19, 2009 20:51:23    Last update: January 11, 2011 20:14:18
If CSS3 border-image is properly supported, making a rounded corner box is very easy. You just need a round corner image like this: The following markup: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ... would render like this (try it in Firefox 3.5 and Google Chrome): However, IE as of version 8.0 does not support border-image . So until border-image is reliably supported in all major browsers, we still have to rely on tried and true tricks to make it work. In general, I found three general categories of tricks to make rounded corners: Good old tables. This trick creates a table of 9 cells and uses the 8 cells on the perimeter to render the borders and rounded corners. The central cell is used for...