How to build floating shelving?
If you can avoid floating, I suggest you do. It's inherently weak. (And sooner or later, someone's probably going to try chinups or an entire Encyclopedia Britannica on your work.)

If you gotta, Rockler sells these blind shelf supports: http://www.rockler.com/blind-shelf-supports. Hope you're in the US, or shipping/customs might be tough.

(My review on them is way at the bottom of the list, titled "somewhat disappointing".)

I built a torsion box sandwich of 1/2" baltic birch ply top and bottom with 3/4" x 3/4" oak between. Rockler suggests an extra long 7/16" drill bit for these, though you could avoid that if you drilled the back and middle 3/4" before assembly. (Post back if you want a drawing of the box construction... I don't know if I'm really describing it well.)

Only mount these to wood studs. One per stud would be optimum for strength. You'll want to turn them so the mounting holes are vertical, as the spacing for a 2x4 isn't quite right.