Wednesday, November 9, 2011

CSS position:relative + position:absolute

If we set relative positioning on div-1, any elements within div-1 will be positioned relative to div-1. Then if we set absolute positioning on div-1a, we can move it to the top right of div-1:

#div-1 { 
 position:relative; 

#div-1a { 
 position:absolute;
 top:0;
 right:0;
 width:200px; 
}

Read more at "Learn CSS Positioning in Ten Steps" tutorial

Tuesday, November 8, 2011

Cannot load 32-bit SWT libraries on 64-bit JVM

This usually is happened when launching a 32-bit SWT application on MacOS. The solution lives on the SWT official FAQs
You need to be sure that you are forcing your launch to use a 32-bit VM. Apple ships most of their VMs with 32 and 64-bit binaries. To force the VM to run in 32-bit mode, use the -d32 option as VM argument in your launch configuration. Note that as of Snow Leopard (OS X v10.6) the default VM is 64-bit.