Gas bubbles in a water filled cavity move upwards due to buoyancy. Near the roof, additional forces come into play, such as Lifshitz, double layer, and hydrodynamic forces. Below uncharged metallic surfaces, repulsive Lifshitz forces combined with buoyancy forces provide a way to trap micrometer sized bubbles. We demonstrate how bubbles of this size can be stably trapped at experimentally accessible distances; the distances being tunable with the surface material. By contrast, large bubbles (≥ 100 µm) are usually pushed towards the roof by buoyancy forces and adhere to the surface. Gas bubbles with radii ranging from 1 to 10 µm can be trapped at equilibrium 1 distances from 190 nm to 35 nm. As a model for rock, sand grains, and biosurfaces we consider dielectric materials such as silica and polystyrene, whereas aluminium, gold and silver, are examples of metal surfaces. Finally, we demonstrate that a presence of surface charges further strengthens the trapping by inducing ion adsorption forces.